Hisnul Muslim 144

When stricken with a mishap or overtaken by an affair

قَدَّرَ اللَّهُ وَمَا شَاءَ فَعَلَ

Qadarullaahi wa maa shaa'afa'ala.

It is the Decree of Allah and He does whatever He wills.(The strong believer is better and more dear to Allah than the weak believer, and in each of them there is good. Be vigilant for what is to your benefit and seek the help of Allah and do not falter. But when you are stricken by some setback, do not say: "If only I had done such and such..." rather say: "It is the Decree of Allah and He does whatever He wills". For verily the saying 'if...' begins the work of the Devil.)