All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
Everything that happens in this life is predestined by Allaah, among which is death; for more benefit, please refer to Fatwa 83292.
As Allaah predestined the reasons, He also predestined the causes; fighting against a disease with a medicine is like fighting what is predestined with what is predestined. But if something already happened, like if death really occurred, then it is wrong to regret what happened and say: "If I took him to the hospital, I would have saved his life." The Prophet forbade us from saying such a statement saying: "If something happened to you, do not say: ''If I did such and such, then such and such could have happened, but rather one must say: “Allaah predestined this, and Allaah does whatever He Wills.”; because the preposition “if” opens the gate for the devil (i.e. to whisper and grief the person)." [Muslim]