The Messenger of Allah said: "Nothing afflicts the believer, whether fatigue, grief, disease - even a worry that concerns him - except that by it, Allah removes something from his bad deeds."
عَنْ أَبِي سَعِيدٍ الْخُدْرِيِّ ؓ قَالَ قَالَ رَسُولُ اللَّهِ ﷺ مَا مِنْ شَيْءٍ يُصِيبُ الْمُؤْمِنَ مِنْ نَصَبٍ وَلاَ حَزَنٍ وَلاَ وَصَبٍ حَتَّى الْهَمُّ يَهُمُّهُ إِلاَّ يُكَفِّرُ اللَّهُ بِهِ عَنْهُ سَيِّئَاتِهِ