You made a mistake.
The other person, your manager, your colleague, your customer, your friend, whoever is impacted by your error, is allowed to get angry at you. They can be disappointed.
You can’t. You’re not allowed to feel embarrassed or angry at yourself or scared of the consequences. You don’t get to feel self-pity.
Feeling anything about your mistakes is stupid. Because they don’t matter. The only thing that matters is your response.
Time is zero sum. You only have twenty four hours. Any time spent feeling embarrassed or angry because of your mistakes is time that cannot be put into fixing them. Yes, you look like an idiot when you mess up, but you look like even more of an idiot if you delay fixing your fuck-up because you’re too busy tending to your own fragile ego.
The mistake are not the primary issue. Yes, learn from them, but don’t dwell on them.
Seneca, in his letters, talks about grief and dealing with loss. He describes how men, in their wills, instructed their wives to grieve for only a month. After that period, mourning was considered insincere and counter-productive. To mourn for years was considered effeminate and weak.
Do the same for your mistakes. Big or small, choose how long you are going to cry about them and don’t exceed it.
Because time spent lamenting your errors is time that could be spent putting them right.