Hi, welcome to the ehealth forum and I am glad to help you.
You seem to be suffering from obsessive compulsive disorder (OCD).
Obsessive thinking disorder symptoms can vary from person to person, depending on the kind of thoughts surging through one's mind. In your case, it seems to be the fear of thinking sinful and blaming yourself over and over again. Such trepidation is leading to compulsive behaviors, that is, dwelling on certain disturbing images, words and thoughts.
Treatment may include medications depending on the severity of the disease combined with cognitive behaviour therapy.
You must consult your psychiatrist for definitive diagnosis as the same is not possible online.
Hope this helps. Take care.
Note: This post is not to emphasise final diagnosis as the same cannot be made online and is aimed just to provide medical information and no treatment suggested above be taken without face to face consultation with health care professional.