Why is it I swear in my mind at God when in church and even when I wake up in the morning. I am a believing Christian, but this has got me very worried. I ask God and the Holy Spirit to remove these evil thoughts. Why do they keep popping up? I love Jesus and have accepted him in my life, but what is this interference? I read about Hymenaeus and I do not want to be delivered into Satan's power.
I'm not in a position to be able to answer your question. There are neurological disorders which include compulsive cursing. In the medical literature it is called "coprolalia." Like many another disorders it can have a range of displays from silent thoughts to involuntary outbursts. Whether you have this problem is something only a doctor could determine and even then they would not be certain.
The only thing I can offer is what Peter advised, "Be sober, be vigilant; because your adversary the devil walks about like a roaring lion, seeking whom he may devour. Resist him, steadfast in the faith, knowing that the same sufferings are experienced by your brotherhood in the world" (I Peter 5:8-9). Don't accept matters as they stand. Figure out ways to not curse. Study yourself to figure out what triggers the events. It might be something as simple as popping up when nothing major is occupying your thoughts. When you find a pattern, then find an alternative to break the pattern.