We all experience them. Those moments when we beat ourselves up. The presentation wasn't perfect, you didn't get the promotion, the relationship didn't work out, the list goes on. Here's something to try; the next time you are talking crap about yourself to yourself, remove your name and add a friend's name and see how comfortable that feels.
There is no way in a hundred lifetimes you would speak to others in the same negative way you speak to yourself. I'm an Olympic gold medalist in beating myself up and let me assure you, it solves nothing.
Every time you feel the urge to put yourself down, stop, then force yourself to think of something you are grateful for in your life. It may sound Pollyanna, too bad. You won't do it well the first few times, keep trying.
Or you could try the strategy of talking to others the way you talk to yourself. That's if your plan is to lose friends and people you care about.