Cbt (i think this is what you were asking about) is "cognitive behavioural therapy" which is a fancy way of saying that it teaches you to have a more optimistic view on the world.
I have been depressed for many years and been on various medications. When cbt was suggested I thought it was crap and that trying to convince myself everything was great was to live a lie, but after doing 8 weeks of cbt I learnt that there is good and bad in life (simple but true) and not to let the weight of the world crush us.
It is a way to setup an automatic response, like you already have now, except that it will be an optimistic response! An automatic way to deal with the pain of self-doubt, self-hatred and criticism and replace them with possitive and uplifting thoughts.
Talk to your doctor, counsellor, mental health professional about cbt. Maybe it can be of help for you also.
Please remember, that even if you feel alone, there are always people who care about you, you just have to let them know you need them.