I’ve struggled with impure and intrusive thoughts, too, but in the past year or so it’s gotten a lot easier. So I’ll give you what worked for me. It might not be perfectly relevant to you, but hopefully it will help at least a little.
Whenever I had impure thoughts, I would panic, because my immediate reaction would be “Oh no, I need to get this thought out of my head quickly before I commit a sin…” If I couldn’t get the thought out of my head after a few tries, I would get really upset, panicking even more that I was committing a sin.
When I finally worked this out, it made all the difference: It doesn’t matter how long an unwanted thought is in your head. It’s not, “If I can get rid of it within five seconds, then I haven’t sinned, but if it’s still there after ten, then I’ve sinned.”
You can’t commit a sin that you don’t choose to commit. As long as you don’t want the thought to be there, then it’s just an unwelcome guest that’s popped into your head. It might be there for a second, or a few seconds.
I once read someone say they’d had an impure thought in their head for literally hours, and the entire time they were desperately trying to get it out. That person still hadn’t committed a sin, because that thought was still unwanted.
If an impure thought pops into your head, it’s not a sin until you decide that you want to think about it. But be very careful here - sometimes when I was struggling with an unwanted thought and was telling myself “I don’t want to think this”, another thought would pop into my head, also an unwanted thought, something like, “Yes, I do want to think this,” and I’d be panicking even more that this meant I’d sinned.
Guess what? Those are still unwanted thoughts. And we know that they’re not actually our thoughts, that we aren’t actually saying these things. If we were, then we wouldn’t feel sick or afraid or distressed when they came into our head, and certainly wouldn’t be trying to get rid of them. If we really believed them, we’d feel it in our hearts that they were true. The devil thinks we’re stupid, and that he can plant anything in our heads and trick us into thinking that’s consent. It’s not. Don’t believe him. You can’t accidentally sin. You’ve got to mean it, and really mean it.
These aren’t our thoughts. We don’t want them, and they therefore hold no power over us.
Anyway, when I realised that it’s not about the length of time a thought is there, but rather about choosing to think about it, I realised that there is absolutely no use in trying to get rid of a thought out of your head as quickly as you can. In fact that inevitably leads to panicking, and the thoughts are even worse.
So don’t panic. Don’t think, “I must get rid of this immediately or else I’m sinning.” If an impure thought pops into my head, I do the exact opposite: I relax. I take a breath (doesn’t have to be particularly deep), and as I do, say to myself “Relax”. I don’t try to force the thought away. I just tell myself to relax.
The first few times this happens, you might have to remind yourself why you’re relaxing e.g. “Relax, because you are not choosing to think this thought, so there is no need to panic,” or “Relax, because Jesus knows your heart, and understands that you aren’t choosing this thought”. After a few times, just the single word “relax”, or even just taking the breath on its own will probably be enough.
Anyway, I take that breath and let myself relax. If I’m in the middle of something, (e.g. reading), then I’ll first stop what I’m doing for a second so that I can take that breath and just concentrate on relaxing. And then after I’ve done that, I just go right back to whatever I’m doing. The thought might still be there, trying to get my attention, but I just stay relaxed and try to ignore it.
Again, even if the thought is dancing around the inside of your head trying to get your attention, you’ve still not chosen it. Just carry on as if it’s not there. It doesn’t deserve your attention. Sometimes, imagining yourself lightly brushing the thought away like it’s a pesky fly can work. If I’ve got a particularly annoying thought, I’ve actually found that a slight shake of my head will get rid of it. But if those things don’t work, that’s okay. Just ignoring is fine. Again, giving too much attention to the thought is probably going to make it worse.
If after several seconds the thought is still bothering you, or it’s gotten worse, just do the same thing again - deep breath, relax, and remind yourself that you haven’t chosen it. The important thing is to not worry about it.
And from experience, I can tell you that this can get better. I used to get thoughts that were so bad, I’d be in tears, or unable to sleep (or both). Now, if I get a thought, I’m so used to just ignoring it that it goes away almost immediately. If it takes a few times, sometimes I’ll actually laugh and roll my eyes and maybe even comment aloud, “Wow, God, what a stupid thought, right?” I know that I don’t have to be afraid of them. God understands that we don’t choose these things.
Wow, that was a pretty long post. I hope it helps you in some way, at least. I guess to sum up, Unwanted thought = annoying fly. Don’t try to reason with flies. Just ignore them.