One thing that helps is using a technique called "form and location." Basically it helps us allow the thought without identifying with it. It comes from Acceptance and Commitment Therapy (3rd wave CBT). So when the thought comes up, think about what the thought looks like if it were an object. How big is it? What does it sound like? Is it in your voice or someone elses? Where in space is in located? Is it moving or still? If it's moving, what direction and what speed? The main thing is to try and normalize intrusive thoughts, as annoying as they may be, everyone gets them to some degree. When we judge ourself for it, we suffer twice. Take care!