This is a tough one, and I have tried all sorts of things. To me the key question is whether there’s something I can do, so the issue is about a decision or action of some kind, or there isn’t anything to be done and I’m just stewing.
If I’m stewing, I don’t find that there’s any rational response that actually helps. With emotional matters, intellectual tools usually don’t accomplish much. You can’t paint with a screwdriver.
If all I’m after is just some relief from the obsessing, I force myself to run a little tape every time the troublesome thought comes to mind. It could be on the order of a mantra (such as a slogan or verse or affirming phrase), or it could even be nonsensical. The point is that I practice switching to that every single time my head goes where I don’t want it to.
The Serenity Prayer can be great for this if you have it at the tip of your tongue. (And it’s worth acquiring.)
If you’re into meditating, a little mind-clearing zazen can have the same effect.
Getting away from thrashing the subject, even for just a little bit, can do wonders for my sanity and my ability to march back in and deal with the things that can be dealt with—and let go of the things that can’t.