Definitely this will not be easy at leas initially. The attitude of equanimity has to be consciously cultivated. Experience and exposure will season us for facing failure also. If we consciously imprint in us that failure and success are two sides of the same coin, y and by we will not be much affected by either.
For this first we need some proper guidance, then self cultivation. Age and experience also will come to help.
Instead of that if we start worrying about the failure, you will lose your mind and you will never think. So success will never approach you in that condition. So be positive always and don't lost somewhere because of your failures. Try again and correct your path. Success will come to you with a garland. Be positive.
I think you are coming up with the same type of threads on a regular basis - on failures, challenges, disappointments, hopes, etc. It is becoming really boring to discuss these same topics.
Keep smiling...one day life will get tired of upsetting you.
Failures are to be taken in normal ways and there is no need to panic. What is required is stand up again and face the hardships and difficulties of struggling.
I will quote the story of my close friend and colleague who was hard working and sincere but lost his first promotion while others inferior to him superceeded him. He came home and no one could notice any change in his behavior. He told calmly this thing to his family members and had a normal day. Next day his wife curiously asked him why he was not a bit perturbed. He simply smiled and told her not to worry and forgot this. We were also surprised by his behaviour as he did not make any complaint in our presence or anywhere else.
Unfortunately he lost his promotion next time also. Still there was no change in his behaviour. I was a bit surprised as I was close to him and he did not confide with me also anything in this regard.
Next time he got his promotion and after that in subsequent promotions he superceeded many colleagues including me and finally he was on the top in our discipline and headed a senior position and we were all under him for quite sometime till we retired from service one by one.
So failures will be there but there will be bright sun light beyond those failures.
Knowledge is power.