I heard the Messenger of Allaah sallallahu `alayhi wa sallam say, “There is no Muslim who is afflicted with a calamity and says that which Allaah has enjoined, Innaa lillaahi wa inna ilayhi raaji’oon. Allaahumma ajurni fi museebati wakhluf li khayran minha (Verily to Allaah we belong and unto Him is our return. O Allaah, reward me for my calamity and compensate me with something better than it), but Allaah will compensate him with something better than it.”
She said: When Abu Salamah died, I said, who among the Muslims is better than Abu Salamah, the first household to migrate to the Messenger of Allaah sallallahu `alayhi wa sallam ? Then I said these words, and Allaah compensated me with the Messenger of Allaah sallallahu `alayhi wa sallam.
Saheeh Muslim