I basically agree with the above poster…try to ignore them or more precisely “shake them off”.
If a bad thought pops into my head, as soon as I recognize it I reject it… Usually by imposing another thought or mental comment like…“Well that’s a stupid thing to think” or some such. I’ll sometimes even chuckle or make the comment out loud depending on whether others are around or not.
By not giving the bad thought any consideration whatsoever, I place myself squarely under the protection of Our Lord. The evil contained in the thought has no place to attach and simply vanishes (sometimes not as quickly as I would like…
That said, I would not discount the other priest’s advice to “fight them” either. However, I would suggest that there are different ways to fight. Often times the best ways are the more subtle ways.
First and most important is to immerse yourself in the Love of God. Seek to live out the commands to Love God above all else and your neighbor as yourself. The more fully immersed you are in this, the more fully this Love actually becomes your defining characteristic, the easier it will be to both recognize and dismiss bad thoughts.
Love, Godly Love, is the Key…
Second - Do not become overly concerned about random bad thoughts. Give them too much consideration and the devil will use this to begin an assault on your self esteem and try to drag you down to despair.
That said…Don’t ignore that possibility that bad thoughts can be evidences of a deeper “fault” that might need to be addressed. They might also point to something or someplace being a trigger and hence a “near occasion to sin” - something to be avoided.
In dealing with this second point, I like to use the “
Seven Deadly Sins” as a guide for they really point to the “root cause” faults that underpin so many other “sins” of both act and thought. Then one can work to apply the contrary
Virtues
Your confessor would be able to help you discern if this is the case…
One of the most important things to remember about this is that we need to be both diligent
and patient. Overcoming faults and growing in holiness is a bit like dieting and exercise. It takes time and the improvements tend to be incremental. You will devise a spiritual plan and implement it. You will go along for a time without really noticing much change…the one day someone will say to you - “have you lost weight?” - OOPs sorry - I mean someone will comment on how much more peaceful, more loving, more calm, happier etc that you look and act. Or perhaps it will simply be you that note - “Wow” I haven’t had a (fill in the sin) thought in a long time…Thank you God"…
So be patient with yourself.
I hope that some of this is of help.
peace
James