Anxiety is an absolute bitch for putting weird shit in our heads. Problem is, when we dwell on it and try to analyse it, it almost feeds it until it tips over into an intrusive repetitive thought pattern.
Around 6 years ago, off the back of 1 single random thought, I ended up with severe debilitating anxiety with awful intrusive thoughts. It was non stop and I honestly wanted to die it got that distressing. But honestly, with time you can stop this.
I started taking valerian root (I was too scared to take the citalopram I had been prescribed as I was only 20 at the time) and each and every time this thought came, I used to mentally do a long shhhhhhhhhhhh and think of something else. At the beginning, the thought would immediately start up again after I'd used my technique, but with practice of shhh-ing and distracting, the thought slowly started having less impact and hold on me, until eventually, I'd almost roll my eyes with the stupidness of it!
Don't let yourself 'listen' or give the shouting attention. It's something that has randomly occurred in your brain, it means nothing, it's freaked you out and now you're perpetuating it by analysing and questioning it. Try to let it wash over you, you are not going mad. You won't be like this forever, you just need to be on it with stopping the thought in its tracks. 