Abu Hurairah (May Allah be pleased with him) reported:
Messenger of Allah (ﷺ) said, "A strong believer is better and dearer to Allah than a weak one, and both are good. Adhere to that which is beneficial for you. Keep asking Allah for help and do not refrain from it. If you are afflicted in any way, do not say: 'If I had taken this or that step, it would have resulted into such and such,' but say only: 'Allah so determined and did as He willed.' The word 'if' opens the gates of satanic thoughts".[Muslim].
Arabic/English book reference: Book 1, Hadith 100