For this, start small. My mindset on this sort of thing changed largely by taking up a sport (I'm a capable athlete, but not stellar). I screwed up a lot. Instead of beating myself up about it, I looked at each "failure" (by some metric, varied by sport) as an opportunity to learn. It's exactly what I'd tell a friend or child in that situation. Pick yourself up, brush off the dirt, examine what went wrong, try again. Ask others for help and feedback, it may be embarrassing at first, but it's better than making a fool of myself every time by doing it wrong or poorly.
Failure is an option, because we aren't perfect. We will fail, and how we carry on afterwards is the part that matters. Developing this attitude in one area will carry over to others. Professionally, I had a terrible habit of thinking (impostor syndrome) that I should know what I was doing, wouldn't ask for help, suffered from analysis paralysis, etc. This personal growth helped me out tremendously there.