Wondrous is the affair of a believer, as there is good for him in every matter; this is not so for anyone but a believer. If he experiences pleasure, he thanks God and it is good for him. If he experiences harm, he shows patience and it is good for him.
Hadith, Sahih Muslim (2999)