Next time, when you get stuck in your head, repeating the same problem over and over again. In a moment of awareness or through some reminder like a post-it note on a screen, ask yourself “What would I have to hear to change my opinion?”.
And then watch the mess.
Your ego will start to defend itself.
“Of course I am right, there is nothing that would convince me to think something else.”
“Pfff…”
“Well, maybe if X would be true… but it’s not so… anyway…”
“Is it really not true? How do I know it’s not true?”
“Oh, because it came from that guy I don’t like.”
“Why don’t I like that person? How did I get there?”
“Well, this is weird, is this whole self-inflicted? Did I just come up with that out of nowhere just in my head?”
“Nah, there must have been a reason! Yeah, I’m not an idiot!”
“Hmmm…”
“Ok, so let’s say that X is true… Not that it is! Just for the sake of argument…”
“X could be true…”
“Gooood dammit, I am a moron.”
“Fuuuu….”
“Anyway… luckily I haven’t told it to anyone. That would be embarrassing.”
This might take anything from a few minutes to a few days and several cycles of there and back. And in that time it will not be pleasant, but it will help you get a new perspective and learn something about yourself and others. Everyone else is going through this as well! Yes, you are not the only one with consciousness.
I found it to be a similar pattern to meditation. You will just keep failing at this, but it is worth trying, just so next time it is a bit easier and you might catch yourself earlier.
You might realise that you have tied yourself into a knot in more cases than one.
Good luck!