Psychotherapy. Cognitive behavioral therapy (CBT), a type of psychotherapy, is effective for many people with OCD . Exposure and response prevention (ERP), a part of CBT therapy, involves exposing you over time to a feared object or obsession, such as dirt. Then you learn ways not to do your compulsive rituals.