Ibn Mas'ud (May Allah be pleased with him) reported:
I visited the Prophet (ﷺ) when he was suffering fever. I said, "You seem to be suffering greatly, O Messenger of Allah." The Prophet (ﷺ) replied, "Yes, I suffer as much as two persons." I said, "Is that because you have a double reward?" He replied that that was so and then said, "No Muslim is afflicted by a harm, be it the pricking of a thorn or something more (painful than that), but Allah thereby causes his sins to fall away just as a tree sheds its leaves".[Al-Bukhari and Muslim].
Arabic/English book reference: Book 1, Hadith 38