Allah describes the story of Prophet Yusuf as the best story. Yusuf’s life was a series of misfortune, obstacle, setback, disaster. He lost everything — his former life, his family, his freedom — everything except Allah. And that is what redeemed him, his sincerity to his Master.
Keep this in mind when you face difficulties in life. No matter how bad it gets, all of it could merely be a precursor for your highest success and a great story of your life that you will read in a book on the Day of Judgment. And there is no true success without sincerity.