Overthinking has been a big problem in most of the peoples life. Gives you a negative attitude, affects your relations with friends, family etc. How can you possibly stop yourself from overthinking when probably you have no control of what to think?
Fill your time with things that make you happy and forget the negative. If you sit still for to long that's when the mind gets you