Signs of a Good End in Islam
Question

Are there any signs that indicate that a person’s life ended well?
Praise be to Allah.What is a good end in Islam?
A good end in Islam means when a person was guided before his death to keep away from that which angers the Lord and to repent from sin, and to focus on doing acts of worship and good deeds, and then he died in this good state.
One of the indications of this is the authentic Hadith narrated from Anas ibn Malik (may Allah be pleased with him) who said: The Messenger of Allah (peace and blessings of Allah be upon him) said: “When Allah wills good for His slave, He uses him.” They said, “How does He use him?” He said, “He guides him to do good deeds before he dies .” (Narrated by Ahmad, 11625; At-Tirmidhi, 2142; classed as authentic by Al-Albani in As-Silsilah As-Sahihah, 1334)
The Messenger of Allah (peace and blessings of Allah be upon him) said: “When Allah wills good for His slave, He sweetens him.” He was asked: “What is this sweetening?” He said: “Allah guides him to do righteous deeds before he dies, then He takes (his soul) whilst he is in that state.” (Narrated by Ahmad, 17330; classed as authentic by Al-Albani in As-Silsilah As-Sahihah, 1114)
Signs of a good end that appear to the dying person
There are signs of a good end, some of which are seen by the dying person as he is dying, and some which may be visible to other people.
With regard to the signs of a good end that appear to the dying person, these are things that give him the glad tidings, as he is dying, indicating that Allah is pleased with him. As Allah says (interpretation of the meaning):
“Verily, those who say: ‘Our Lord is Allah (Alone),’ and then they stand firm, on them the angels will descend (at the time of their death) (saying): ‘Fear not, nor grieve! But receive the glad tidings of Paradise which you have been promised!’” [Fussilat 41:30]
These glad tidings come to the believers when they are dying. (See Tafsir Ibn Sa`di, 1256)
This is also indicated by the Hadith narrated by Al-Bukhari, 6507; Muslim, 2683 from the Mother of the Believers `Aishah (may Allah be pleased with her) who said: The Messenger of Allah (peace and blessings of Allah be upon him) said: “Whoever loves to meet Allah, Allah loves to meet him, and whoever hates to meet Allah, Allah hates to meet him.” I said, “O Prophet of Allah, do you mean hating death , for all of us hate death?” He (peace and blessings of Allah be upon him) said, “It is not like that; but when the believer is given the glad tidings of the mercy and pleasure of Allah, and His Paradise, he loves to meet Allah, And when the disbeliever is given the tidings of the wrath and punishment of Allah, he hates to meet Allah and Allah hates to meet him.”
Al-Nawawi (may Allah have mercy on him) said:
“What this Hadith means is that the love and hate that are referred to here are those that happen when one enters the stage in which repentance is not accepted, where the dying person is told of his situation and he is shown his destiny.”
Signs of a good end in Islam
There are many signs of a good end , which the scholars (may Allah have mercy on them) have derived from the texts which speak of that. These signs include the following:

Uttering the Shahadah (testimony of faith) when dying.

The Prophet (peace and blessings of Allah be upon him) said, “A person whose last words are La ilaha illallah [there is none worthy of being worshipped but Allah] will enter Paradise.” (Narrated by Abu Dawud, 3116; classed as authentic by Al-Albani in Sahih Abu Dawood, 2673)

Dying with sweat on the forehead.

Buraydah ibn Al-Husayb (may Allah be pleased with him) said: I heard the Messenger of Allah (peace and blessings of Allah be upon him) say, “The believer dies with sweat on his forehead.” Narrated by Ahmad, 22513; At-Tirmidhi, 980; An-Nasa’i, 1828. (Classed as authentic by Al-Albani in Sahih At-Tirmidhi)

Dying on the night or day of Friday.

The Messenger of Allah (peace and blessings of Allah be upon him) said: “There is no Muslim who dies on the day of Friday or the night of Friday, but Allah will protect him from the trial (fitnah) of the grave.” (Narrated by Ahmad, 6546; At-Tirmidhi, 1074. Al-Albani said: When all its Isnads (chains of narrators) are taken into consideration, this Hadith is sound or authentic)

Dying as a fighter for the sake of Allah.

Allah says (interpretation of the meaning):
“Think not of those as dead who are killed in the way of Allah. Nay, they are alive, with their Lord, and they have provision.
They rejoice in what Allah has bestowed upon them of His Bounty and rejoice for the sake of those who have not yet joined them, but are left behind (not yet martyred) that on them no fear shall come, nor shall they grieve.
They rejoice in a grace and a bounty from Allah, and that Allah will not waste the reward of the believers.” [Al `Imran 3:169]
And the Prophet (peace and blessings of Allah be upon him) said: “Whoever is killed for the sake of Allah is a martyr, and whoever dies for the sake of Allah is a martyr.” (Narrated by Muslim, 1915)

Dying of the plague.

The Prophet (peace and blessings of Allah be upon him) said: “The plague is martyrdom for every Muslim.” (Narrated by Al-Bukhari, 2830; Muslim, 1916)
`Aishah (may Allah be pleased with her), the wife of the Prophet (peace and blessings of Allah be upon him), said: I asked the Messenger of Allah (peace and blessings of Allah be upon him) about the plague, and he told me that it is a punishment that Allah sends upon whomsoever He will, and that Allah has made it a mercy for the believers, for there is no one who stays in his land at the time of a plague, bearing that with patience and seeking Allah’s reward, knowing that nothing will befall him but that which Allah has decreed for him, but he will be given a reward like that of a martyr.” (Narrated by Al-Bukhari, 3474)

Dying of a stomach disease .

The Prophet (peace and blessings of Allah be upon him) said: “… and whoever dies of a stomach disease is a martyr.” (Narrated by Muslim, 1915)

Dying because of being crushed by a falling wall or by drowning.

The Prophet (peace and blessings of Allah be upon him) said: “The martyrs are five: the one who dies of plague, the one who dies of a stomach disease, the one who drowns, the one who is crushed by a falling wall, and the one who is martyred for the sake of Allah.” (Narrated by Al-Bukhari, 2829; Muslim, 1915)

If a woman dies as a result of childbirth, or when she is pregnant.

The evidence for that includes the Hadith narrated by Abu Dawud (3111), according to which the Prophet (peace and blessings of Allah be upon him) said, “A woman who dies with child is a martyr.” Al-Khattabi (may Allah have mercy on him) said: “What this means is if she dies with a child in her womb.” (`Awn Al-Ma`bud)
Imam Ahmad narrated (17341) that `Ubadah ibn As-Samit (may Allah be pleased with him) said: The Messenger of Allah (peace and blessings of Allah be upon him) told us about the martyrs and mentioned among them, “A woman who is killed by the child in her womb attains martyrdom, and her child will drag her by his umbilical cord to Paradise.” (Classed as authentic by Al-Albani in Kitab Al-Jana’iz, p. 39)

Death caused by burning , pleurisy and tuberculosis.

The Prophet (peace and blessings of Allah be upon him) said: “Being killed for the sake of Allah is martyrdom; the plague is martyrdom; drowning is martyrdom; dying of a stomach disease is martyrdom; and the woman who dies in childbirth, her child will drag her by his umbilical cord to Paradise.” (Abu Al-`Awam, the custodian of Bayt Al-Maqdis added: and burning and tuberculosis). (Al-Albani classed it as authentic Sahih At-Targhib wa At-Tarhib, 1396)

Dying to defend one’s religion, wealth or life.

The Prophet (peace and blessings of Allah be upon him) said: “Whoever is killed defending his wealth is a martyr; whoever is killed defending his religion is a martyr; whoever is killed in self-defence is a martyr.” (Narrated by At-Tirmidhi, 1421)
Al-Bukhari (2480) and Muslim (141) narrated that ‘Abdullah ibn ‘Amr (may Allah be pleased with him) said: I heard the Prophet (peace and blessings of Allah be upon him) say: “Whoever is killed defending his wealth is a martyr.”

Dying guarding the borders of Islam for the sake of Allah.

Muslim (1913) narrated that Salman Al-Farisi (may Allah be pleased with him) said: The Messenger of Allah (peace and blessings of Allah be upon him) said: “Guarding the borders of Islam for one day and one night is better than fasting and praying at night for a whole month, and if he dies (whilst performing this duty), he will go on receiving the reward for this great deed and his provision (continually), and he will be spared the questioning in the grave. ”

Dying whilst doing a righteous deed.

The Prophet (peace and blessings of Allah be upon him) said:  “Whoever says La ilaha illallah, seeking the Countenance of Allah thereby, and that is the last of his deeds, will enter Paradise. Whoever gives charity and that is the last of his deeds will enter Paradise.” (Narrated by Ahmad, 22813; Classed as authentic by Al-Albani in Kitab Al-Jana’iz, p. 43. See Kitab Al-Jana’iz by Al-Albani (may Allah have mercy on him), p. 34)
These are the good signs which indicate a good end, but despite that we cannot be certain that a specific person is one of the people of Paradise unless the Prophet (peace and blessings of Allah be upon him) testified that he will go to Paradise, such as the four Rightly Guided Caliphs.
We ask Allah to grant us a good end.
For more details, please see the following answers: 200530 , 135314 , 40671 , 4054 , and 237764 .
And Allah knows best.