Rolling with the waves

If change is inevitable, then why do I panic sometimes?Einstein spent about 7 years struggling with failed attempts and dead-ends. Why is it when we "fail" at something that it can become a stuggle to keep our chin up.Can we learn from our mistakes? Or can we view them differently.