Here’s my suggestion:
Cut negative people out of your life
You know who they are. This doesn’t mean they are bad people, but they are sapping your energy and contributing to this problem.
Admit to yourself who you truly are and who you are not
Maybe you are down on yourself because you’re not being honest with yourself about who you are. Maybe you’re trying to be something you’re not; maybe you’re doing things you really don’t want to. This is not the same as throwing up your arms and saying “I’m not talented enough for X; I’m more suited to Y.” Being good at something comes down to practice and, I believe, wanting it badly enough. First you have to think about the things you really want, and work for them.
Be nice to people
Send out positive vibes. Good people will gravitate toward you. Be honest and kind. Build a reputation for being dependable and levelheaded.
Read to gain perspective. Great authors put themselves into their work and you get a sense for how they think, feel, and what they have struggled with. You will find that you’re not as different as you believe yourself to be. It is only a matter of overcoming your own self-criticism. Allow yourself to be flawed but always seek to improve.
Stop thinking about yourself all the time
Some forms of anxiety and depression are ultimately rooted in egotism or even narcissism. Focus on something else.