What helps you when it comes to overthinking?

I notice that my mental health gets worse when I spend a lot of time alone and I overthink everything.