I never could completely banish those kind of thoughts, no matter how hard I tried. What I ended up learning was how to direct my mind.
When I dabbled with Buddhism, one of the meditations they taught me was Mindfulness of Breathing. In-two-three, out-two-three with a challenge to focus your thoughts on your breathing and nothing else. I never could do that, but what I was told after was what stuck with me. It was basically "Don't condemn yourself for your straying thoughts. Just turn back to center. To your breathing. Repeat as necessary."
All I can say is don't be too hard on yourself. See those thoughts for what they are and turn to your center.
