Perhaps you'll gain a bit of empathy and understanding at how easy it is to fall into this mistake.
Some people fail and embrace their failure, unable to think they could ever recover from it.
And some people fail and strive to do better.
I'm not going to suggest you don't beat yourself up over this. Just that you don't beat yourself up over this more than is good for yourself. In time, forgive yourself.
Experience is a brutal teacher, but you learn. My God, do you learn. - C.S. Lewis
Life is usually all about how you handle Plan B. - Jack3Beans
Listen without defending; Speak without offending - FaithinAK