how do you prevent a mental STD?
I have some catchy ideas, but I'm too lazy to write them out.
Don't ask.
Personally, I think the only way is to practice mental abstinence. No thinking until you're married. Unless you're thinking out of your ass, because anal count.