People who , in sadness, pray to God for a favour to spare their loved one are in error. It has been seen millions of times that he does not do that. He just doesn’t.
Mind you , If I ever get to that state facing the death of my wife..... I bet I will pray hard too. What else can you do ?