Hadith 156

that the Prophet (ﷺ) said, "When Allah gives a Muslim a bodily pain, He will give him a reward as soon as he is ill, for those deeds which he was used to do when he was healthy. Thus, if Allah gives him healing, He washes him . But if he causes him to die then he forgives him

clean of sins

Anas bin Maalik (رضي الله عنه)Al-Adab Al-Mufrad 501Adab & Virtues on Sickness