I get that way a lot as well. I don't know if this helps. There was this book called the power of intention. One way to get out of this type of thinking Is to have an intention. Like "I want to feel good". So you see there what you ultimately want is to feel good. Or be happy. So you can say to yourself "I want to be happy" over and over again like a mantra. Changing the channel of your thoughts into something you intend.

Then the universe arranges itself based on your intention. Kind of like magical thinking. But I think I'm going to look into that book again. I hope you feel better soon

I also thought that this is a lot like we what prayer is. Its magical thinking. Or for it to make sense you call it intention. So its like you have some kind of power over your life.