Over the years, I have set a few mental triggers for myself that let me know my thinking is revved up and running away with me.
One of them is when I notice I'm talking to myself, either letting my in-my-head voice loose or carrying on my side of an argument that either has happened or has yet to happen.
Another is when I hear myself say "I need to figure that out..." This is usually a signal to me that I am in my head, my thinking is revved up, and I need to take a step back from the situation.
Saying "I need to figure it out" is like saying "I need to think about it more," which is usually the last thing I need to do. When my mood is low, thinking about the problem just makes me feel worse. In fact, my feelings are an indicator that I should avoid actively thinking about the problem.
I like the description of thinking as a power tool, like a drill. A drill is useful for specific tasks, but it's not something to be used every day, as we would use a hammer or a screwdriver. Thinking is useful for planning a trip, troubleshooting a DSL connection -- practical stuff. But thinking about concepts like my career, my life, my place in the world -- the thinking there gets dicey and not to be trusted.
Now, when I hear myself say that trigger phrase, it's my cue to stand up, walk around, breathe deeply, get some blood flowing, change up what I'm focusing on -- distract myself, in other words. Later on, an insight or next step may pop into my head when there is less thinking on my mind, and then I'm over the hump.