Oof. Well speaking from experience… antidepressants help, therapy helps, and knowing that the Asshole Brain telling you these things is fictional and just a result of brain chemistry helps a lot.
The fight never really ends, but with the right tactics you will win a lot more than you lose.