100% to the above and I would look specifically for Cognitive Behavioral Therapy which specializes in treating distorted thinking. It rescued me from my early thirties and I haven’t been depressed since. Our brains are wired to generate stories and narratives around everything, we can’t help it, and sometimes those narratives are distorted but cause damage and like a scab, we keep reinforcing and picking at them. Learning to recognize when you’re doing this and to stop is a skill like riding a bike, and a good therapist can help. Group therapy also helps because you can see other people going into these catastrophic narratives that look absurd to you and give you an idea of some of the same distortions you might be imagining.
Then other thing is, no matter how smart you are, you can’t debug yourself, you need other people. If you have a distorted negative feeling of yourself, then when you try to fix yourself, you’ll be more inclined to feel something isn’t working or you are doomed the first time you hit a roadblock or relapse.
And ultimately sometimes medication can help you get through the initial hurdle of such negativity, another reason you need to see a professional to evaluate this.
Go check out YouTube and Wikipedia for some cognitive behavioral therapy sources to see if it might fit.