Good things can sometimes come from unpleasant events.
Whether it's losing a job, getting a divorce, or simply missing the bus for work, there is always a possibility of finding a better situation than the one you lost.
Of course, not all unpleasant events lead to an immediate "upgrade" in life circumstances. Sometimes they serve to "train" you for a future "promotion".
The secret behind all of them is to consciously welcome the opportunity, and start looking for the hidden benefit.
If you find yourself facing an unpleasant situation, affirm "I welcome the opportunity for greater and grander things."