Our lessons in life aren't usually something we are very excited to receive, but they are given to us for a purpose. The following message by Seth Godin sums it up quite well. :)
"Don’t waste the lesson. Things rarely turn out precisely the way we hoped. Sometimes, if we’re lucky, we can figure out why. If we find the lesson and learn from it, it might be even more valuable than if we’d simply gotten lucky." --Seth Godin