The important thing is what you do after.
Failure is inevitable in life. If you never fail then you haven’t pushed yourself
It’s important to own up to your mistake, learn from them and attempt to rectify them
Also, it’s important to learn to forgive yourself