Imaam Ibn Qayyim (may Allaah have mercy on him)
said:
Every preordainment which a person dislikes and
which is not favorable to him is either a punishment for a sin (he has
committed) or a remedy to a sickness which if the Wise had not remedied it with
the medicine, the sickness would have thrown him into destruction. Then again, it
could be a means to a blessing that cannot be attained except by means of that misfortune.
Hence, the misfortune will come to an end and disappear,
and that which results from it of blessing will be eternal without termination.
Therefore, if a person comprehends these two issues, it will open up for him
the door of being pleased with his Lord regarding everything He decrees and
preordains for him.
Source: Madaarij
as-Saalikeen bayna Manaazil (Iyyaaka Na‘bud wa Iyyaaka Nasta‘een), by Imaam Ibn
Qayyim al-Jawziyyah; transl. by Abdus-Samee Abdus-Salaam