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?
Keep yourself busy with different activities. It won't help if those activities will boring for you. You will just be thinking and overthinking while doing those jobs, so find something really engaging for yourself and start doing it.
Obviously, by doing something interesting to yourself, overthinking can be removed. Also when excessive thoughts fill the mind,
you can walk on a street and see how many poor and helpless people are living on the street. You can remove your excessive worries by observing how they are living there. Then think about those helpless poor people on the street then your mind will be diverted from overthinking and from there many good deeds will happen.
Actually, you can be happy even being poor and living on the street. It's hard, but it's a supreme skill. You should always strive for a better life, but at the same time be content with what you have.