When my therapist told me that thoughts are just thoughts, they are not good or bad, they just are. They cannot hurt you. He taught me to hear the intrusive thought, acknowledge it by saying something like "ok intrusive thought. I heard you. But I have stuff to do now so thanks for sharing. Bye now."