How to stop being so hard on myself?

I feel like the reason I am hard on myself is because I never feel good enough, both in career and socially.
In work if I make a mistake with something it can ruin my day and I'm angry at that mistake, even if it's something simple but a mistake.
Then with socially, I sometimes feel like my friends could do without me, and I've never been with a girl and I just don't feel good enough.
But it's getting me down a lot and I don't know how to cope or what to do...
How to stop being so hard on myself?
Post Opinion