Bulugh al-Maram, Book 16, Hadith 1526 (In-Book)

Abu Hurairah (RAA) narrated that the Messenger of Allah said: “A believer who is strong (and healthy) is better and dearer to Allah than the weak believer, but there is goodness in both of them. Be keen on what benefits you and seek help from Allah, and do not give up. If anything afflicts you do not say, ‘If I had done such and such things, such and such would have happened.’ But say, ‘Allah decrees and what He wills He does,’ for (the utterance) ‘If I had’ provides an opening for the deeds of the devil.” Related by Muslim.

وَعَنْ أَبِي هُرَيْرَةَ ‏- رضى الله عنه ‏- قَالَ: قَالَ رَسُولُ اَللَّهِ ‏- صلى الله عليه وسلم ‏-{ اَلْمُؤْمِنُ اَلْقَوِيُّ خَيْرٌ وَأَحَبُّ إِلَى اَللَّهِ مِنْ اَلْمُؤْمِنِ اَلضَّعِيفِ, وَفِي كُلٍّ خَيْرٌ, اِحْرِصْ عَلَى مَا يَنْفَعُكَ, وَاسْتَعِنْ بِاَللَّهِ, وَلَا تَعْجَزْ, وَإِنْ أَصَابَكَ شَيْءٌ فَلَا تَقُلْ: لَوْ أَنِّي فَعَلْتُ كَانَ كَذَا وَكَذَا, وَلَكِنْ قُلْ: قَدَّرَ اَللَّهُ وَمَا شَاءَ فَعَلَ; فَإِنَّ لَوْ تَفْتَحُ عَمَلَ اَلشَّيْطَانِ } أَخْرَجَهُ مُسْلِمٌ.‏ (1988)‏.‏ ‏1 ‏- صحيح.‏ رواه مسلم (2664)‏.‏

sunnah.com

also referenced under: Book 16, Hadith 1569 (English)