I settled on the triune brain model as a good-enough approximation for my needs in relation to this (whether it's factually accurate is another issue). I would then categorize my thoughts and subsequent actions based on that model (mainly limbic vs. neocortex). It's pretty easy to tell them apart with some high-level introspection. Then, I'd short-circuit any emotional thinking once I spotted myself engaging in it, and injecting rational thought into those times when the limbic system would normally be in control. I'd spent decades of life not doing this, so it took a long time for this to not feel weird, but eventually it became natural.
Once the big reactive emotions (e.g. anger) were dealt with, I turned attention to the more subtle influences. I think there's a middle ground of thoughts that are a more complex or a mix of emotional and rational (think things like national pride, identity, career progression). That's a harder job and a more involved topic. In fact, I can't say I've completely got that done, or even fully mastered the first part. The caveman is always there, of course, and perhaps the best you can hope for is restraining him.