This article by Pastor Richard Bucher describes Martin Luther's anfechtungen- his devastating episodes of feeling judged and rejected and utterly condemned by God. These are experiences with which many Christians with OCD are likely to be all too familiar.
While Pr. Bucher is right in saying that they were not simply manifestations of clinical depression, he is wrong in denying that they had a psychological component. These experiences were certainly encounters with the Living God and His Law. But they were encounters filtered through Luther's OCD, much the relationship of anyone with OCD with God is experienced through that filter. Certainly Luther's own theology would recognize that to feel condemned by the Law is not in itself a bad thing; it is a necessary step toward the forgiveness and healing brought by the Gospel. But that is where OCD poses a special kind of spiritual problem: while the sufferer can hear the accusing voice of the Law all too well, it can be remarkably difficult for such a person to hear and believe the Good News of God's grace in Christ.
The answer Luther found was nonetheless the answer God offers to every sinner: the righteousness of His Son, given as a gift of grace, and apprehended through faith. It's God's answer to our obsessions about our sins brought about by our broken brains, as well as to the sins born of our broken souls and corrupted hearts and wills.
Cling to that promise of forgiveness and acceptance through Christ, Luther urges. Hang on to Jesus for dear life. He is the only righteousness any of us will ever have in this life. He is the only righteousness any of us need in the next. And He categorically promises over and over again never to cast out anyone who clings to His promise of forgiveness and eternal life by grace through faith in Him.
The name "Satan" literally means "the Accuser." Don't listen to the accusations of the Enemy, Luther advises, when he casts your sins into your teeth in an effort to disrupt your relationship with God. Instead, cling to Jesus- and believe Jesus, not Satan.
Or, he might have added had he been born a few centuries later, of your OCD.