'Everything will be ok in the end. If it's not yet ok, then it's not yet the end.'
There's nothing that makes you feel worse than the realisation that you have failed. It doesn't matter how difficult or simple the task was,it doesn't matter how many times you've failed before,the sting will always be as sharp and as painful as if it were your first failure. It's especially pronounced when there is a way what went wrong could have been prevented in the first place,or if it is entirely your fault,and yours only.
I wish I could say that over the years the impact of the sting of failure as it's teeth penetrate even your strongest deepest guard-walls will become less painful. I,however cannot do that,because it is not true. Its always going to hurt when you fail.
There is a silver lining to this dark cloud though; the duration of the pain gets shorter and shorter as you mature. Yes,it actually does. With time,if you are keen about it,you will learn how to forgive yourself faster and how to accept it as a lesson well taught. You will (hopefully) learn how to pick yourself up quicker and quicker everytime you fall because it will dawn on you (hopefully) that everyone falls,and all that matters is that everytime you fall,you get up,dust yourself off and try again. So you will start to view mistakes as the stepping stones they are to becoming a better bigger you,as a way to get one step closer to fulfilling your purpose in this mysterious fore-planned cycle that is your life. And if you find yourself in the same messy situation a second time round,then there's a bit of the lesson you missed the first time. A friend of mine is always saying that God is in the business of giving retakes [think more second chances than double portion of trouble ;) ]
I know I say it a lot,but I mean it each time I do just as much as the time before:Never stop. Never give up. No matter what.