Abdullah bin Mas'ud (may Allah be pleased with him) narrates: I went in to the Prophet (peace and blessings be upon him) and he (peace and blessings be upon him) had a fever. I touched his body and said: O Messenger of Allah, you have a very severe fever. He (peace and blessings be upon him) said: "Yes, I suffer a fever like that of two men among you." Ibn Mas'ud (may Allah be pleased with him) said: That is because you have two rewards. He (peace and blessings be upon him) said: "Yes. By the One in whose hand is my soul! Whatever Muslims there are on the face of this earth, when any illness or hardship, or anything else, befalls them, Allah Almighty wipes away his sins in return for it, just as the leaves of a tree fall."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجنائز / 6531