When wicked thoughts pop into your head, cast them down and think on good, lovely and positive things. You can and must control what you think.
Read: Philippians 4:8
8 And now, dear brothers and sisters, one final thing.
Fix your thoughts on what is true, and honorable, and
right, and pure, and lovely, and admirable. Think about
things that are excellent and worthy of praise.