Abu Huraira reported: The Messenger of Allah, peace and blessings be upon him, said, “Allah Almighty said: If I put My servant to trial and he does not complain of Me to his visitors, I will release him from his captivity, then I will replace his flesh and blood with what is better, then he will resume his record of deeds anew.”
Source: al-Sunan al-Kubrá lil-Bayhaqī 6548
Grade: Sahih (authentic) according to Al-Albani
عَنْ أَبِي هُرَيْرَةَ قَالَ قَالَ رَسُولُ اللهِ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ قَالَ اللهُ تَبَارَكَ وَتَعَالَى إِذَا ابْتَلَيْتُ عَبْدِي الْمُؤْمِنَ فَلَمْ يَشْكُنِي إِلَى عُوَّادِهِ أَطْلَقْتُهُ مِنْ أُسَارِيَّ ثُمَّ أَبْدَلْتُهُ لَحْمًا خَيْرًا مِنْ لَحْمِهِ وَدَمًا خَيْرًا مِنْ دَمِهِ ثُمَّ يسْتَأْنَفُ الْعَمَلَ
6548 السنن الكبير للبيهقي كتاب الجنائز باب ما ينبغي لكل مسلم أن يستشعره من الصبر
4301 المحدث الألباني خلاصة حكم المحدث صحيح في صحيح الجامع