I see that you wrote this a couple of days ago, so I'll assume you're past the "in the moment" flood of feelings that can some with a mistake.
I'm not a huge fan of CBT (cognitive behavioral therapy) in general, but I do think it's very good in this type of situation. If I am upset about making a mistake, I can generally guarantee that I am doing one or more of the "
cognitive distortions" that CBT talks about.
I may be deciding what other people must think about my mistake or thinking that I "always" make mistakes. Sometimes I just look at the list of cognitive distortions and find the one I'm doing.
I don't know if this comes into play for you, but I'm in my 50s, and I have some types of mistakes that I continue to make over and over and so if I do one of those, there's an added layer of unhappiness about that.
No matter how much of an expert you are in CBT, though, it's still going to be embarrassing and painful to make a big(gish) mistake. I think that's just part of life. We will have uncomfortable feelings about some things. They will come, but then they will go.
We can use CBT to learn not to get more upset about them than makes sense, but we will still be upset some.
Learning how to make a mistake and to feel the uncomfortable feelings that go with it and then to keep on going is an important life skill, and I don't know any way of learning it other than by making mistakes and dealing with them.
I used to work with a "wise old man" several years ago who had a saying (probably not original): "Good judgment comes from experience. Experience comes from bad judgment."
I don't know if any of this is helpful to you. I suppose I'm trying to say that the bad feeling that comes when you make a bad mistake is okay. It's very unpleasant, but it doesn't mean that you are bad like the feeling, and the feeling will pass. It's a growing pain. Hugs.