How wonderful the affair of the believer is! Indeed, all of his affairs are good for him. This is for no one but the believer. If something good happens to him, he is grateful to Allah, which is good for him. And if something bad happens to him, he has patience, which is good for him. [Muslim]
"«عجَبًا لِأَمر المُؤمِن إِنَّ أمرَه كُلَّه له خير، وليس ذلك لِأَحَد إِلَّا لِلمُؤمِن: إِنْ أَصَابَته سَرَّاء شكر فكان خيرا له، وإِنْ أَصَابته ضّرَّاء صَبَر فَكَان خيرا له». [صحيح.] - [رواه مسلم.]"