Mishkat al-Masabih 1579
وَعَن شَدَّاد بن أَوْس والصنابحي أَنَّهُمَا دَخَلَا عَلَى رَجُلٍ مَرِيضٍ يَعُودَانِهِ فَقَالَا لَهُ: كَيفَ أَصبَحت قَالَ أَصبَحت بِنِعْمَة. فَقَالَ لَهُ شَدَّادٌ: أَبْشِرْ بِكَفَّارَاتِ السَّيِّئَاتِ وَحَطِّ الْخَطَايَا فَإِنِّي سَمِعْتُ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ يَقُولُ: إِنَّ اللَّهَ عَزَّ وَجَلَّ يَقُولُ إِذَا أَنَا ابْتَلَيْتُ عَبْدًا مِنْ عِبَادِي مُؤْمِنًا فَحَمِدَنِي عَلَى مَا ابْتَلَيْتُهُ فَإِنَّهُ يَقُومُ مِنْ مَضْجَعِهِ ذَلِكَ كَيَوْمِ وَلَدَتْهُ أُمُّهُ مِنَ الْخَطَايَا. وَيَقُولُ الرَّبُّ تَبَارَكَ وَتَعَالَى: أَنَا قَيَّدْتُ عَبْدِي وَابْتَلَيْتُهُ فَأَجْرُوا لَهُ مَا كُنْتُمْ تُجْرُونَ لَهُ وَهُوَ صَحِيح . رَوَاهُ احْمَد
From Shaddad ibn Aws and as-Sunabihi: They went in to visit a sick man and said to him: "How are you this morning?" He said: "I am this morning in a state of blessing." Shaddad said to him: "Rejoice at the expiation of bad deeds and the shedding of sins, for I heard the Messenger of Allah ﷺ say: 'Allah, Mighty and Majestic, says: When I try a believing servant of Mine and he praises Me for what I have tried him with, he rises from that bed of his [free] of sins like the day his mother gave birth to him. And the Lord, Blessed and Exalted, says: I have restrained My servant and tried him, so continue to record for him what you used to record for him when he was healthy.'" Reported by Ahmad.