As-salamu `alaykum wa rahmatullah
There is an ayah in Surah al-Anfal that is in the context of War, but the beauty of the Qur’an is such that you can read a verse and it brings a whole new meaning to you than the standard tafsir. Consider this ayah:
“…If Allah knows any good in your hearts, He will give you something better than what has been taken from you, and He will forgive you, and Allah is Oft-Forgiving, Most Merciful.” [al-Anfal: 70]
The Prophet (s) was commanded by Allah to say this to the captives taken in war. But it’s also something that we can say to ourselves whenever a worldly benefit is removed from our hands, because let’s face it: we may not be captives of war, but we are captives of the Dunya and this is why a loss devastates most of us. Our hearts become attached to certain things from this world, and this pollutes the pure nature that the heart was created upon. So to purify the heart, Allah will sometimes remove some things from our possession and we suffer a loss. But He `azza wa jall is telling us: if there is goodness in your hearts after this, then there will be no real loss because what Allah gives you in replacement is much much better and on top of that He will forgive and show us mercy for what we endure of the loss.
So be patient and submit to the Work of Allah `azza wa jall, as He Knows all
May Allah keep replacing our losses with better things, ameen!