I saw the Prophet when he was dying. He had a drinking-cup containing water, and he would put his hand into the cup, then wipe his face, then say, “O God, help me to bear the evils of death,” or, “the pangs of death.”
Anas reported God’s messenger as saying, “When God has a good purpose towards His servant He gives him punishment beforehand in this world, but when He has an evil purpose towards His servant He refrains from dealing with his sin till He takes from him full payment for it on the day of resurrection.”
Sa'd said that when the Prophet was asked which people suffered the greatest affliction he replied, “The prophets, then those who come next to them, then those who come next to them. A man is afflicted in keeping with his religion; if he is firm in his religion his trial is severe, but if there is weakness in his religion it is made light for him, and it continues like that till he walks on the earth having no sin.”
Tirmidhi, Ibn Majah and Darimi transmitted it, and Tirmidhi said this is a hasan sahih tradition.