Train yourself to cut off an intrusive thought immediately. And if you are forgetful and fail to chase them away at once bring God your repentance. Be at pains over this, so that you acquire the habit. The soul is a creature of habit: according to the habit you have acquired, so will you act all the rest of your life.