When Allah, the Exalted, takes something away from you, He compensates you with something better, but only if you are patient and seek your reward from Him. The Prophet (bpuh) said:
"Whoever has his eyesight taken away from him and is (then) patient, he will be compensated for it with Paradise."
The Prophet (bpuh) said in another hadith:
"Whoever loses a loved one from the people of this world and then seeks his recompense with his Lord, will be compensated with Paradise."
So do not feel excessive sorrow over some misfortune, because the One Who decreed it has with Him Paradise: recompense and a great reward.
Those that are afflicted in this world and are close to Allah will be praised in the highest part of heaven:
(Peace be upon you, because you persevered in patience! Excellent indeed is the final home!) (Qur'an 13: 24)
We must contemplate the reward one receives for forbearing hardship.
(They are those on whom are the Salawaat [i.e. blessings] [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.)
(Qur'an 2: 157)
Truly, the life of this world is short and its treasures are few. The Hereafter is better and everlasting and whosoever is afflicted here shall find his reward there. And whosoever works hard here shall find ease there. As for those who cling to this world, who are attached to it, and who are in love with it, the hardest thing for them to bear would be to lose the world's comforts and riches: they desire to enjoy this life alone. Because of this desire, they don't react to misfortune as well as others do. What they perceive around them is this life alone: they are blind to its impermanence and insignificance.
O' afflicted ones, if you are patient you lose nothing; and though you may not perceive it, you are profiting. The person who is afflicted with hardship should reflect upon the outcome in the Hereafter, the outcome for those who are patient.
(So a wall will be put up between them, with a gate therein. Inside it will be mercy and outside it will be torment.) (Qur'an 57: 13)