بســــــــــــــــــــــــــــــــم الله الرحمن الرحــيــم
السلام عليكم و رحمة الله وبركاته

Far too often we come across problems in our lives that simply make us say !@#$#$@&*. But there is a silver-lining.

Calamities and disasters are a test,and are good for the believer in the sense that reward is stored up for him the Hereafter thereby; how can it be otherwise when he is raised in status thereby and his bad deeds are expiated?

“How wonderful is the affair of the believer, for his affairs are all good, and this applies to no one but the believer. If something good happens to him, he is thankful for it and that is good for him. If something bad happens to him, he bears it with patience and that is good for him.”Muslim, 2999
So if calamity befalls a Muslim, he must say Inna Lillaahi wa inna ilayhi raaji’oon (Verily to Allah we belong and unto Him is our return).

How wonderful are those moments in which a person turns to his Lord and knows that He alone is the One Who grants relief from distress. How great is the relief when it comes after hardship.
“but give glad tidings to As‑ Saabiroon (the patient).Who, when afflicted with calamity, say: ‘Truly, to Allaah we belong and truly, to Him we shall return.’They are those on whom are the Salawaat (i.e. who are blessed and will be forgiven) from their Lord, and (they are those who) receive His Mercy, and it is they who are the guided ones” 2:155-157

“There is no Muslim who is stricken with a calamity and says what Allaah has enjoined – ‘Verily to Allaah we belong and unto Him is our return. O Allaah, reward me for my affliction and compensate me with something better’ – but Allaah will compensate him with something better.” Muslim 918

We should take example of our beloved Prophet صلى الله عليه وسلم when he was stuck with calamities like the passing away of his wife (Khadijah RA) and his 2 sons,the news of fighting ill-armed at Badr and the fact that his beloved uncle did not die as a Muslim.

Ibn Taymiyah (may Allaah have mercy on him) regarded his imprisonment as a blessing that had been caused by his enemies.
Ibn al-Qayyim said: One day he – meaning Ibn Taymiyah – said to me: What can my enemies do to me? My garden is in my heart; wherever I go it is with me and never leaves me. My detainment is seclusion (an opportunity for worship), my being killed is martyrdom, and being expelled from my city is a journey.
He used to say of his detainment in the citadel: If I were to spend the fill of this citadel in gold, that would not be sufficient to express my gratitude for this blessing. Or he said: That would not be sufficient to reward them for what they have brought to me of goodness.