Nice question I like to answer in brief,because failure makes man perfect is the thaught which explains lots of things such as when the person is failure in his exam of 10 standard he gives exam for than 3 times and then also he give 4 trial for exam and the child becomes as he clear the exam so failure is the key to success .
So don't be panic on when you are failure .due to failure we can become rich but we should have good patient and we are always helpful to everyone.if we fail to drive the car with different chances we got to drive and one day we drive the car properly.
Similarly if the person is climbing the mountains with several opinion and he drops and then also he trys to climb but he was not able to climb but on one day he started climbing on the mountains and he reached at the top of the mountains and take a selfie and he was so much happy that how can I explain and the feeling for him was great and when he came down he was so much happy and tells everyone failure is the key to success .so don't became panic at any situation but you should have a solution to eradicate the situation and we should always ready to make sucess.