Failure always has a hidden Hint

One of the big lesson i learnt in life from entrepreneurship is failure always leaves a hidden hint.

I have heard this quote many times “failure is key to success”, but i never realized how does it lead to success. 

Failure always left me with one of the two context -

  1. Stress and Regret of why i failed.
  2. Hint to resolve this failure which is a key to success.

#1 is the default context i operated from, the frequent failures i had in last three years in my startup journey has changed my brain patterns to shift from #1 to #2.

How did this shift happen? I believe its the acceptance of failures, perseverance and passion towards my startup ideas