"Surely We shall resurrect the dead, We are recording all that they are sending ahead and that they are leaving behind. We have recorded everything in an open ledger". Q36: 12
One of the precondition to living well inside the grave is to have a good end. It has been clarified in the Qur’an that the good end is certainly meant for those who are conscious of their duties to Allah. Though, it is a bit difficult to determine a good end, but there are signs that signify that some of which are enumerated below:
The ability to pronounce the “Shahadah”. It is recommended for Muslims surrounding a dying Muslim to prompt him without force to pronounce the statement. But it can only be possible for those who deserve it by their good actions when they were hale and healthy.
To die as a martyr: This is not only referring to those who die in the course of a holy war but it also include somebody that die as a result of plague, abdominal ailment, drowning, burning, tuberculosis. Others are the victims of a collapsed building, a woman who dies as a result of complications in pregnancy or at childbirth, a man killed by a tyrant ruler because he confronted him with his inadequacies etc.
Burial Rites: A good end can also be determined by the way a burial rite is performed. If a deceased, has the rare opportunity of getting 40 pure Muslims to witness and perform his Salat Janazah. Allah will accept their intercessions on his behalf. A deceased Muslim also benefits from the prayer of supplications offered by all Muslims. That is why we are urged to always pray for the dead Muslims.
Good comments: Praises of other sincere Muslims on a deceased are other signs of a good end.
Sweat on the forehead of a dying Muslim and to die on the day or night of Friday is also a sign of good end.
Good Children: The Noble Prophet (SAW) is reported to have said: The documentation of deeds of son of Adam seized by his death except in respect of three things: A good deed of continues benefit, Knowledge that benefits others and a good child that prays for him. Children should continue to offer prayers and give Sadaqah (Acts of Charity) on behalf of their late parents. Surely this would benefit them immensely.
May Allah allow our end to be good.