Note: Let me pause here and say I'm not a psychiatrist nor am I a therapist. I'm simply a person who studies who suffers/suffered from the same thing and has had victory. There may be variations or other accompanying factors that I may not have experience in so I would encourage you not to rely on me or what I've written here but I would encourage you to seek out those whom may be of more help then I. My qualifications would be summed up in 2 Corinthians 1:4 whereas I'm offering to share with you what has brought comfort to me.
In my studies I have learned how the Limbic part of the brain which is the emotional core of the brain works in correlation with the prefrontal cortex which is the reasoning and decision making part of the brain. Feelings originate in the limbic part of the brain; some have argued that the Limbic part of the brain is often the part being spoken of in the bible when it references the "heart" or the "flesh" or "old self". The Limbic part of the brain is also what is activated by stimulation from drugs, sex, and other things. It is also the center for emotions such as anxiety and fear. These two parts of the brain can operate together and independently. If developed properly the Limbic system can be a powerful ally (Prov. 22:6). However if developed improperly it can be a frustrating adversary. Not one that can't be overcome however. This, I'm convinced, is what's being spoken of when Paul wrote "be transformed by the renewing of your mind" (Rom. 12:2). Essentially Paul is saying the transformation of the person is preceded by the renewing of the mind. Modern day scientist will confirm this is exactly what happens (I'd encourage you to watch the Conquer Series [ https://conquerseries.com/ ] which dives into this deeply though it's a study more for addicts). A child raised up improperly builds what's called synaptic pathways in their Limbic systems. The more a person thinks along these lines the stronger and more reinforced those synaptic pathways get developed, good or bad. It's like making a path in the woods. If you walk it once you can hardly tell anyone has gone through there. If however you walk the same path many times, that path becomes a trail. And if someone needs to get through the woods in the same direction, they default to taking the trail which then becomes more trodden and resembles more of a road. Once it becomes a road many more are gathered to it instead of taking an off-beat path, even if it's somewhat out of the way, and thus it becomes a highway.
Let me give you a couple real life examples I hope make sense and maybe you can relate to. My wife and I recently became foster parents and took in a 6 year old girl about four months ago. By God's orchestration it has been a blessing--she has been a blessing! Though we have only had her for about four months, she has changed A LOT in such a short amount of time! Not outwardly as if she's grown, (though she has me measure how tall she is almost every other day just in case). Rather, she has changed inwardly in her way of thinking. Before I throw my daughter under the bus for the sake of this example know she has always been a wonderful kid, but one that originally came with such a different attitude then what she has now, even in such a short time. Her way of thinking, her programming, her interaction with the world, with us, was void of normal social interaction (to be expected given what she's endured thus far), furthermore her interactions, beit with that soft gentle cute face she'd give, more largely consisted of manipulative behavior accompanied by tantrums, pouting, and an overall disrespectful attitude.
What's amazing is in four months she's bloomed! Praise God! Her grades are now on par with the rest of the class and even exceeding in some areas. She interacts more and more every day and has even started shaking hands at church! That's not the most amazing part, the most amazing part is the bad attitude, the manipulations, the pouting, and the tantrums that used to be quite frequent are practically gone! That is... until visitation happens. It took a few times before I noticed the pattern, as there was next to no visitations at first. Then, recently visitations have picked up momentum (something we've encouraged and have had time to spend with and even take bio family out to dinner, go trick or treating together, and even to a concert with them, our little one, and my wife). With the increase in visitations it didn't take to long before you saw the pattern. Behavior one way with us, and then automatically changed right back to the old way after just a short time being plugged back into bio family and that atmosphere. Even a phone call with her family has caused her to revert to her old way of thinking.
Since she's been with us she's learning new programming, new synaptic pathways, but her bio-family is a trigger that causes her to travel down her old synaptic pathways and then even her interactions with the world are done so through her old way of thinking. Then after a couple days she will start operating back in the system established at our house and things will start going good again. What's interesting is when she recalibrates back into our household system she often picks up where she left off. However, when something pulls her back into her old way of thinking (after all, that's how she learned to deal with her environment she was taken from) it can get ugly fast.
However, the longer we have her and the more she practices thinking within our system the more I see the new system overriding the old system. What I see is the more she practices or is trained by us (Prov. 22:6) the more established in that way of thinking she gets. The old way of thinking is still there but the new way of thinking is becoming more and more prominent! Even now I've seen her take her new way of thinking and even interact with her bio-family according to it and not the old way, thus showing them respect and courteousness too! Though that's still a work-in-progress. The amount of change in such a short time is phenomenal. You might be thinking how nice it would be to have a young mind with such plasticity, which in part I agree, however in the Conquer Series study I mentioned above showed evidence that even those most advanced in years could still create new synaptic pathways.
Some more quick examples. Have you ever driven to the same place every day such as work, the gym, grocery store, etc. And in doing so taken the same turns, the same roads, etc. Then, even on a day you're not working or planning to go that way you inadvertently head that direction and maybe even take a turn or two that you didn't intend to? I have a habit of going to the fridge when I enter the kitchen.. even when I'm not hungry. Even when I went in the kitchen to talk to my wife. However I go to the fridge enough with intention that my brain has well traveled synaptic pathways along those lines that when I'm not intentional I often auto-pilot to the fridge.. (I blame my wife for all the deliciousness the fridge beholds!). Now that I'm dieting, I go to the fridge less (no pop to grab, no left over cheesecake from the night before). Though once in a while I still auto-pilot to it without thinking but seldom. When a person gets a prolonged injury, such as a knee or hip injury, they learn to shift their weight and walk a different way. Interestingly when they start to get better, one of two things happen. They either keep walking the new way having been doing it long enough now it's the new norm, or they fall back into walking the old way, not noticing it doesn't hurt like it once did. Why? Because they had an old way of thinking they fell back into, the way of walking they did most of their life before the injury. Why one would think they would be joyful to be walking normal again, yet unless something or someone points it out, it often goes unrealized for awhile because it's nothing new to them. Sometimes people stop hurting but they've been limping so long, it's simply the new way of handling things. Reprogramming can happen.
A couple years ago we bought a house, yet for awhile I was auto-piloting in my car after work to the old house we lived in for 15 years prior purchasing our new house. This too has stopped now that I've been in the new house for a couple years. Reprogramming can happen! Once in awhile I still drive by the old place when I'm in the area to see if the current tenants left the ivy bush remain that a late friend gave me. Interestingly, once I turn up the street, I still feel very familiar with some of it. Right after we moved, when I visited the old place, I felt I could weave in and out of the cars parked along side the road with my eyes shut being well familiar with where all the neighbors park. But I'm less familiar with it now, and therefore don't have such confidence. So it is with our reprogramming of the mind and it can be done! (Rom. 12:2). (Don't even get me started on how many times I try using an old password after I've changed it, or try and use a password I set elsewhere..)
Essentially CBT is the exercise of building new paths. When you start you are trekking through the woods without a path to follow so reprogramming the OCD sufferer is like trying to get someone to drive their car through undeveloped woods when there's a highway near by. CBT builds in your mind new synaptic pathways that after time become trails, then roads, and can even become highways. Then the idea is that after time the old highways become overgrown and now the new highway or new well traveled synaptic pathway becomes your new way of thinking. However, you have to be diligent and deliberate to drive your car through the woods repeatedly and avoid the highway. In terms of dealing with OCD you start with the physical, things like abstaining from rituals such as what you might do when making sure doors are locked or your hands are germ free. I can tell you, this isn't easy. It sounds great in theory but in practice, it's torture! At least at first. Until the new way of thinking becomes a trail, then a road, etc it isn't easy and just like it takes time for a trail to be traveled a few times before coming a road, so does the renewing of your mind in this way. I've even came across certain studies dealing with OCD which use immersion therapy where they force a person into events that trigger their OCD but don't let them act on it. For a fellow Christian struggling with religious OCD known as scrupulosity they had them write down their worst fears and to do this every day and then do nothing. Basically with the unseen it's finding a way to provoke the trigger but not act upon it. My confusion is I always thought I needed to not have the thoughts. I didn't realize the transformation came by action. It's encouraging to know the damaged Limbic system can be reprogrammed by the actions made in the prefrontal cortex.