To paraphrase from the book Positive Intelligence, "...whatever outcome you reach, you'll be able to turn it into an opportunity." That can be a strange realization; within ourselves we possess both the ability and the choice to determine how we perceive our circumstances.
In a way, it can be very liberating. It could mean the difference between looking at failure as a step toward progress, instead of a personal torment. Or seeing each ending in life as a chance at a beginning elsewhere. It might also mean embracing your qualities, instead of zeroing in on your flaws.
However you choose to see it, reframing can be quite a useful, and invaluable tool.