An affliction, a trial, a test - no matter how severe it is, Allaah (SWT) has the power to ease it for us.
Especially, when He has blessed you with time to pray, make use of it. He has power over everything and can make anything out of nothing. When hearts are aching and you are desperate for a result, do not waste moments regretting or brooding over what has happened or what it would be if such and such did not happen.
Here is a powerful reminder to make us believe firmly in the Qadr of Allaah.
"The Messenger of Allah (ﷺ) said: 'The strong believer is better and more beloved to Allah than the weak believer, although both are good. Strive for that which will benefit you, seek the help of Allah, and do not feel helpless. If anything befalls you, do not say, "if only I had done such and such" rather say "Qaddara Allahu wa ma sha'a fa'ala (Allah has decreed and whatever he wills, He does)." For (saying) 'If' opens (the door) to the deeds of Satan.'"
[Sunan Ibn Majah]
Therefore, know that what has happened is Allaah’s decree and what is going to happen also will be His will, of course. We should never complain about what He has done. Instead thank Him whole heartedly for His blessings and praise Him genuinely for the trials that took you closer to Him. He loves to see His slaves sincerely begging from Him alone. His trials are nothing but tests to see what we do when we are breaking. Do we hold on to Him alone or fall into the traps of Shaytan and grasp to things that deviate us from His path?
When we are pleased with His decree and beg Him to ease our affairs - it is impossible for Him to let down our faith. Duas are powerful. Pray while you have time. Pray till the very last moment for a miracle.