I've struggled with blasphemous thoughts on and off for 5 years and funnily enough they only started when I trust the Lord began to work in my heart and bring me to faith in Christ. Prior to becoming a genuine Christian I never had these thoughts. I usually get the blasphemous thoughts in the form of swear words against the Holy Spirit in particular. It's usually the 'f' word followed by the Holy Spirit or some other combination. Its so strange and irrational. I've been quite worried that I actually want to think these things and maybe because of how sinful and evil my heart is theres actually a desire to like these thoughts. Its distressing. I'm not as worried as I would like to be but its such a burden to have these thoughts. Like why would I want to think this against the God who I desire to love and know and who sent His Son to die for my sins? It makes no sense! Sometimes I feel so condemned and think the Lord has given me up to the thoughts and I'll perish. Man deep down if I could just rid of these thoughts I would immediately but I cant seem to fully control my mind. There seems to an urge to curse and swear in my mind and even a numbness when the thoughts come. I've been praying and asking the Lord for forgiveness and going to Christ in prayer and seeking to trust Him to save sinners like me. I've asked the Lord to purify my heart and help me to hate these thoughts and think purer things but they're not going away much. It feels so paralysing and I can't even think about much else sometimes. The problem is I can't tell if its Satan, my sinful heart of OCD causing these thoughts or all three. Is it best just to ignore them and carry on living a normal Christian life? Would appreciate some help.
Here is what I've figured out...(please read to the end. Sorry it's so long!)
The fact that you keep going in a circle with these thoughts is what really is the problem. Not the thoughts themselves. That is the trap Satan lays for us to distract us from really seeking the Lord; he keeps us going on the same cycle like, "Oh! I just had a blasphemous though--forgive me God...I don't think I wanted His forgiveness that badly, I didn't seem that concerned about it. Am I an evil person for that? Oh no, what if I'm going to hell? No, God's grace is bigger than that. I just want to get rid of these thoughts, but I can't. Why can't I stop this? Why won't God help me? Has He abandoned me because I thought blasphemy? Oh no! I just thought about something blasphemous again--forgive me God...I don't think I wanted His forgiveness that badly..." And so on.
Satan is keeping you in this cycle of fear and uncertainty so you can't escape from the worries and blasphemous thoughts. The blasphemous thoughts aren't as much of the problem as remaining in this cycle is, because the Devil knows that distracts us from what really matters. He's using the OCD to keep you from focusing on God instead of just moving on from the blasphemous thoughts.
It's not your fault; but the answer to your problem is so easy and so difficult at the same time.
You have to learn to just stop thinking about it. Stop thinking about the blasphemous thoughts so that you can escape this cycle Satan is keeping you on.
I understand exactly how you feel; For three years, I had OCD thoughts about suicide. I was NOT suicidal, mind you--but the fact that I knew that I could made me think "What if? What if I did? That's so terrifying...I could literally throw myself off this building right now. Oh no, what if I do? Would God forgive me? Do I actually want to commit suicide? Maybe I do. Something's wrong with me; I need help. Help me God!...These thoughts haven't stopped. How do I get them to stop? What if I committed suicide to get them to stop? Am I really that desperate?" And the thoughts went on and on and on like this for three years. I went into a depressive state for three months until I went back to school at the end of one summer. I made a lot of new friends, my relationship with Jesus began to strengthen, and I noticed the thoughts were fading away. I was not longer in a cycle because I had found things to keep me from thinking about it, like school, friends, and church. I wasn't in a cycle anymore, but more like I was caught in the spokes of a broken wheel.
And I realized the solution; every time the thoughts came up, I would immediately turn my attention to something else. Literally just laugh the thoughts off and ignore them, and think about something else. It took me three years to learn how to do this; but I think it was worth it, to go through that. Because even now, when I have OCD thoughts about anything I may be irrationally worried about, I can turn the channel in my brain and they don't bother me anymore.
I think God lets us go through this so we know how to escape such a pitiful cycle the Devil tries to trap us in. God wants us to learn how to not let worrying and anxiety keep us from really being close to Him.
Keep in mind, this is NOT an easy thing to learn; it takes a lot of practice. Find wholesome activities to distract you from your thoughts about blasphemy, and I also suggest you write about it. This can help you get the thoughts out of your head. Change the channel in your brain to something else so you don't think about it; when you stop one thought, the entire cycle can be broken.
God will help you learn how to ignore these thoughts in his own time, so you must be patient. I highly suggest going to a councilor or someone to talk to about this so they can help you, too. Don't lose faith in God, and don't lose hope, because there is nothing you can't bear when your trust and faith is strong in Him. When you get on the other side of what you're going through, you will feel stronger mentally. That's how it's been for me, and it's been so worth it.