Is it essential to be present at the moment a person dies, and what should those who are present do?
If you are present at the death of one of your parents or relatives, or others, then it is Sunnah for those who are present to remind him to say the Shahaadah. When he has died and his soul has departed, they should close his eyes, because when the soul departs the gaze follows it. At that point it is not permissible to panic and wail and so on.
If a person is unable to stay with the one who is dying, because he is afraid and is not used to seeing such things, there is no sin on him, but he should try to get used to such things because it will help him spiritually. It may be an individual obligation (fard ‘ayn) upon a person if there is no one else available, in which case he will be sinning if he does not do it.
Shaykh ‘Abd al-Kareem al-Khudayr.
If there is no one else available to close the eyes of the dead Muslim, then cover him, then wash and shroud him, apart from one Muslim, then it becomes obligatory for him to stay with his deceased brother in order to fulfil the obligations towards him. But if there are Muslims available who can do these things, the other Muslims are absolved of responsibility.
It is prescribed for those who are present when a Muslim is dying to recite Soorah Yaa-Seen for him, for that makes it easier for the soul to depart and makes the dying person more steadfast, as it did in the case of some of the Sahaabah to whom it was read.
After the person has died and his soul has departed, it is not prescribed to read Qur’aan over him; rather it is prescribed to make du’aa’ for him and pray for forgiveness and mercy for him and for him to be made steadfast when being questioned in the grave.
And Allaah knows best.