It was narrated that Abu Hurairah said, attributing it to the Prophet (ﷺ):
“The stronger believer is better and more beloved to Allah than the weak believer, although both are good. Strive to seek that which will benefit you and do not feel helpless. If something overwhelms you, then say: Qaddarallah, wa ma sha'a fa’al (It is the decree of Allah and what He wills He does). And beware of (saying) ‘If only,’ for ‘If only’ opens the door to Satan.”
حَدَّثَنَا مُحَمَّدُ بْنُ الصَّبَّاحِ، أَنْبَأَنَا سُفْيَانُ بْنُ عُيَيْنَةَ، عَنِ ابْنِ عَجْلاَنَ، عَنِ الأَعْرَجِ، عَنْ أَبِي هُرَيْرَةَ، يَبْلُغُ بِهِ النَّبِيَّ ـ صلى الله عليه وسلم ـ قَالَ ‏ "‏ الْمُؤْمِنُ الْقَوِيُّ خَيْرٌ وَأَحَبُّ إِلَى اللَّهِ مِنَ الْمُؤْمِنِ الضَّعِيفِ وَفِي كُلٍّ خَيْرٌ احْرِصْ عَلَى مَا يَنْفَعُكَ وَلاَ تَعْجِزْ فَإِنْ غَلَبَكَ أَمْرٌ فَقُلْ قَدَّرَ اللَّهُ وَمَا شَاءَ فَعَلَ وَإِيَّاكَ وَاللَّوْ فَإِنَّ اللَّوْ تَفْتَحُ عَمَلَ الشَّيْطَانِ ‏"‏ ‏.‏
GradeSahih (Darussalam)
English reference : Vol. 5, Book 37, Hadith 4168
Arabic reference : Book 37, Hadith 4307