Finally, brothers and sisters, whatever is true, whatever is noble, whatever is right, whatever is pure, whatever is lovely, whatever is admirable—if anything is excellent or praiseworthy—think about such things. - Phillipians 4:8

Things You Can Do to Overcome Ungodly and Unwanted Thoughts
Intrusive thoughts can not only be frightening, but they can also make us feel guilty. They are unwanted negative thoughts that enter into our minds and sometimes they are things that we would never ever willingly choose to ponder on our own. We oftentimes find ourselves worrying that God will be mad at us for thinking such horrible things or that something bad might even happen to us for thinking about them in the first place.
So what can you do?
Well, first of all I want to say to you that our Heavenly Father tests the mind and He knows our true hearts (Jeremiah 17:10). God loves you and He will not hold you accountable for thoughts that are not from your heart. If it will make you feel a little better, you can do what I do whenever I get intrusive thoughts. As soon as I get one, I sometimes say: "Forgive me, Heavenly Father, for that unwanted intrusive thought. I am so sorry." Or you can also silently rebuke the unwanted thought in the name of Jesus Christ and try not to think about it anymore. Sometimes the best thing we can do is to have faith that God will remove any negative thoughts we are having in Christ Jesus and carry on with our day doing something postitive and constructive with our time.
Let's look at six other ways you can overcome ungodly thoughts
Thought Replacement: Deliberately replace any negative thoughts with postive ones or with a Bible verse that nurtures godly values.
Practice Gratitude: Shift your mindset on positivity by focusing on something that makes you feel grateful.
Engage in Spiritual Activities: Spend time in prayer, reading scriptures, or engaging in other spiritual activities that can provide you with guidance and comfort. I have found much comfort by singing hymns!
Distraction: When an unwanted thought arises, distract it by getting busy and doing something positive. Go for a walk in nature, learn a new hobby (painting sculpting, sewing, needle point, learn a new language), read a good book, write a story or poem, or go help someone else who is going through a problem. Helping others not only distracts us from our own problems, but also strengthens our relationship with God through Christ Jesus and helps us to feel better about ourselves.
Acknowledge and Label the Thought: When an ungodly or unwanted thought enters your mind, simply label it as such without judgement. Remember, it's just a scary thought that has not power over you. Don't focus on it. You are protected by the blood of Jesus Christ.
Be Patient: Be loving, kind, and patient with yourself. Overcoming ungodly and unwanted thought patterns takes time and consistent effort.
In conslusion, please know that you are not alone, because everyone experiences unwanted and ungodly thoughts at one time or another. Accept it as a natural part of life and keep praying to God about it. God is faithful and He will help you through all the battles you may be facing.
When you pass through the waters, I will be with you; and when you pass through the rivers, they will not sweep over you. When you walk through the fire, you will not be burned; the flames will not set you ablaze. - Isaiah 43:2

Author’s Bio
Isabella Boston
Isabella Boston is a Wordsmith and the creator of Bella’s Attic Studio. She is well-versed in copywriting, articles and research, and medical content writing with a focus on traumatic brain injury (TBI), autoimmune disorders, and inflammation within the body. She is a diarist and the author of Passion of Flames.
When Isabella is not writing, she enjoys reading, learning new languages, and spreading God’s Holy Word.