It is narrated from Hazrat Anas (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) said: When Allah Almighty afflicts a Muslim servant with a physical illness, He commands the angels to continue recording the reward of all the good deeds that he used to do. Then, if He grants him recovery, Allah has cleansed and purified him, and if He calls him back to Himself, He forgives him and has mercy on him.
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 12503
Hadith Gradingحکم دارالسلام:صحيح لغيره، وهذا إسناد حسن