Jonathan,
I can't help but feel really angry at whoever told you your OCD is your fault or that you cannot have doubts about Jesus. But please understand that often when we address church leaders or our spiritual mentors who do not know about OCD, their advice can often be detrimental, as they don't understand how your disease causes your problems, and they don't know what explanations of their are poorly aimed at an OCD sufferer and how such words can trigger panic from misunderstanding from an OCD sufferer.
Please rest assured that you are saved, and that these intrusive thoughts are not your fault! OCD causes whatever you fear most to seem like a reality and possibility. Whatever you don't want to think or believe your OCD mind will try to push on you. You responsibility is not in your thoughts, but rather what you choose to do with them. Res assured that faith cannot exist WITHOUT doubt, or else it would simply be called 'knowing'. You would have no more choice in believing in God than you would a choice in believing that 2+2=4. Some Christian scholars even argue that doubt is not a lack of faith, but the very essence of faith! God has chosen not to reveal Himself to us completely, though He has left us many signs and wonders, and much evidence through science, archaeology, and testimony. What we have to do is DESPITE our doubts, choose to believe that God is speaking the truth, trusting that we simply cannot see the evidence that illuminates the bigger picture of God at the moment. Think about doubting Thomas! Peter, the Rock of the church! Think about how many times Jesus asked the disciples to do something far-fetched and the disciples said, "Uh, Jesus, are you SURE?" If you CHOOSE to put your trust in Christ, despite whatever you FEEL is real, you are saved! And especially OCD sufferers will have many doubts enter their minds. When you put your faith in christ, it won't guarantee that the doubts will go away, or even lessen! What will it guarantee? Security in Heaven!
I am an OCD sufferer myself. I doubt God, Christ, and my own salvation all the time, and I wrestle with many scrupulosity issues. I don't think I quite struggle with the unwanted sinful images or thoughts like you do, but I really can empathize with your struggle! I have learned from others wiser than I, including scholars' books, Christian psychologists, and other life mentors, that you cannot base your life on thought, feelings, or ideas when you have OCD. You cannot be blamed for what you cannot control. You must choose to CHOOSE Christ, and when you have a bad thought in your head, CHOOSE not to make anything of it (i.e., repeating a cuss word out loud, following a sexual thought through to an interactive fantasy, etc.).
I hope this helps! A book I highly, highly, highly recommend- INSIST that you read is 'Can Christianity Cure Obsessive Compulsive Disorder?' by Ian Osborn. If you are struggling still especially with doubt, read the next to last chapter of 'The Case For Faith' by Lee Strobel, which discusses how doubt and faith coexist.
God bless you! OCD is a terribly torturous struggle at times, but God does not allow us to suffer through anything we can't handle. You are like Job. Satan says to God, "let me test your servant, Jonathan." God knows your strength and will not let you bear what you can't. If you hold fast to your faith in Christ and look to the Lord, you will come out of this struggle ten times the Christian you were before, and the result of your patience and courage will be glory to the Lord and the Kingdom.
Best of luck!