I think that many of us have had to deal with this from time to time in our lives. Unfortunately, some people are really tortured by repetitive unwanted intrusive thoughts and seem unable to stop them. Fortunately, for me, I've never had it to that degree.
I'm posting this first of a three part YouTube series regarding this subject. To watch parts 2 & 3 click on the title bar at the top.
That said, I hope that someone currently struggling with this problem will find some information that will help them: