Therapy can help a lot with managing your feelings and the way you think about mistakes.
We generally tend to be much harder on ourselves than we would with anyone else and expect the world to do the same.
If you don't have access to therapy you may find this link interesting, it helps us work on how we think and feel about ourselves and our situations.
https://moodgym.anu.edu.au/welcome
I found it helpful even though I'm a lot older than the target client group for the site.