Every living thing must die. It is a fact of life that humans experience death. Some die of natural causes in old age, while others succumb to diseases or accidents earlier in life. For those who know that death is upon them, Allah has given specific instructions. These are simple, one must recite the Shahadah, Laa 'ilaaha 'illallaahu. "There is none worthy of worship but Allah."
The essence of a Muslim's belief is that Allah is one. No one is worthy of worship but Allah. He is the creator of the world and the humankind. He gave us life, and to Him, we all will return. Reiterating this while drawing our last breath is one last act of servitude to Allah and an affirmation of our faith.
The Prophet Muhammad (ï·º) said, "Whoever dies with the last words "There is none worthy of worship but Allah" will enter Paradise," as reported in Hisn al-Muslim 153. This is an instruction for the one nearing death, and people around are to help their loved one say it.
Maintaining one's calm in situations when instruction for the one nearing death has been given is extremely difficult, but when around the sick who are nearing the time of meeting their Lord, the people around should encourage reciting the Shahadah as an instruction for one nearing death. Be mindful that you do not push the ill patient beyond their might but do so gently and recite it next to them so that they can follow and recite the Shahadah. Be gentle in your demeanor, and make sure you are not instructing them to recite it.
The benefit of reciting Shahadah or making dua when one is nearing death benefits people in their afterlife. While they are alive, it will reassure them of how they will be meeting their creator rather than being anxious about the uncertainty of when the time for final rest comes near.