Vitakkasanthana Sutta
When you watch a sad movie, you may feel sad at some points. But you won't carry the sadness with you and become depressed, would you? When you stop watching the movie, you immediately forget about it.

Similarly, you treat the evil unskillful thoughts here like they were some movie appearing in your mind, and ignore them.