This is nothing to be ashamed of. I had two episodes of severe anxiety/panic years ago with 24/7 intrusive thoughts. Extremely disturbing, tiring, frustrating...but hey, I no longer have them and havent for 8 years :-)
How I dealt with them - lost the fear of it happening. Do not say, no, stop, etc, it just gives it more power.
Instead I said bring it on ...started laughing at them (hard at first), but when you embrace them as part of your day, they lose the power to cause anxious anticipation, which in turn adds to the pain of them. When I stopped worrying about them, they stopped coming. Now I can be anxious but my brain does not latch on to stupid awful things - I can think them, then let them go.
Remember everyone has weird things go through their mind - its not abnormal, only the anxiety makes us examine them, fear them, and they stick into a groove in the mind WE made - that groove can be filled in by accepting them and not fearing them...hope that helps x