so long as we are in sinful flesh we can't stop them from popping in, though I found that staying up too late at night brings these thoughts in hard. Just focus on Christ and don't give into temptation.
1 Thess 5:5
Ye are all the children of light, and the children of the day: we are not of the night, nor of darkness.