The desires of one who is contented are subservient to what his Lord wants from him- meaning that which Allah loves and that with which He is pleased. Hence, contentment and the blind following of one's own desires can never coexist in the same heart. And if one has a share of the former and a share of the latter, his heart will be conquered by the stronger of the two.
(‘And I hastened to you, O’ my Lord, that You might be pleased.) (Qur’an 20: 84)
Contemplate this hadith:
"Become acquainted with Allah in good times, He will know you in harsh (times)."
"Become acquainted with Allah," means that you should seek closeness to Him by being obedient to Him, by being thankful to Him for His blessings, and by turning to Him sincerely before hardship befalls you.
"In good times," refers to times of peace, safety, blessings, and good health. "He will know you in harsh (times)," by alleviating your hardship and by giving you an exit from every difficult situation.
It is very important that a special relationship exists in the heart between the slave and his Lord, a relationship that allows the slave to feel so close to his Lord that he requires no other. Thus, he finds company when he is alone, and he tastes the sweetness of remembering Him and supplicating to Him. Allah’s slave will continually face hardship and difficulty until he dies, but if he has a special relationship with his Lord ---- that of being an obedient slave e all of the hardships of life will become easy for him.