Did you know that post it notes, chocolate chip cookies, and safety glass were all discovered by error? Mistakes are how we learn new things, and if we cultivate an open and curious attitude about the errors we make we can learn even more. Take a minute and think about how you feel when you make a mistake. Do you get inquisitive, eager to understand what happened, or do you get angry or depressed, look for someone else to blame, or say or think bad things about yourself? If Alexander Fleming had said 'Oh, stupid me, I left my petri dish open and it got moldy; there must be something wrong with me and I better throw it away before anyone sees it", he probably wouldn't have opened the gateway that led to penicillin and subsequent life saving antibiotics.
If you could avoid all your mistakes, you'd miss everything you learned from them. If you castigate yourself for making a mistake you actually increase the chance of making the same mistake again, as self judgement is one of those tricky 'conversations for no change' similar to should-ing on yourself. If you do keep making the same mistake over and over, it might be that there is some piece of knowledge you are overlooking, so slow down, take a breath, and invite your perception to open without judgement. Instead of berating yourself, invite curiosity and compassion into the picture and become an astute observer, asking 'What can I learn from this?' And then look for a new mistake so you can learn even more :)