You've got a mental habit. It's going to take some time and focus to diminish its momentum. Every time you notice a self-deprecating/worrisome thought come into consciousness, stop, tell yourself "I'm not doing this anymore".
The thoughts you are having are covering up something else that you don't want to deal with. See what is in the moment for you when the thoughts come on. It's probably something emotional. See what's there... it could be joy.