The Family Of Imran - 3:156
"Believers! Do not be like the disbelievers who say of their brothers who traveled or went to war, "Had they stayed with us, they would neither have died nor been killed". Allah makes this kind of thinking a source of sorrow in their hearts. It is Allah who gives life and Allah who kills. Allah sees what you do."
Related:
The Women/4:72
"There are those among you who are slow. If a calamity befalls you, he says, "Allah has been good to me so that I did not fall a martyr with them"."
The Women/4:73
"And if a favor from Allah befalls you, he says, "I wish I had been with them and had won a great success,"as if there had been no friendship between you before."