Overthinking is a cause of depression. We end up imagining situations which have not happened. The fear of its happening itself makes us miserable.
Our brain is hard-wired to think negatives. That came with our Homo Sapiens DNA. Always in fight and flight mode.
The only thing we can do to avoid getting stressed and stop overthinking is to be in the present moment.