That's not cognitive behavioral therapy. Cognitive behavioral therapy has had significant positive effects for me in the past. However it needs the participant's cooperation and effort. It is about prodding your mind with stimuli in such a way that your mind is corrected through exposure.
Also, isn't what you think/feel actually more important anyway? Isn't that person treating you like shit matter mostly because of how it makes you think/feel? Given you're 26 it's not unreasonable to think that this person who you were in contact with for 10 to 15 years was your parent, caregiver, family member, or someone else present during your childhood or adolescence. That is, during the time which you might not have the independence to move away from the issue on your own. Doesn't the problem then become how you deal with its presence?
One of the links had a quote from Eleanor Roosevelt, "No one can make you feel inferior without your consent." Being in shitty situations in life which have a tendency to "breed mental illness" as you say is something which happens to people sometimes. A lot. What you can do about it is change how it affects your mental state, including your attitude toward yourself. So you can't find a job or a date or friends. You can deal with that without considering yourself a turd or worthless or disgusting or other unreasonable things. That's a cognitive problem you should solve. It's ok and normal to feel depressed or inferior or worthless in the moment, but it's not normal to feel that way all the time to the degree you do. So you should take initiative on solving this problem.