It is narrated from Sayyiduna Jabir bin Abdullah (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) said: "Do not wish for death, for the scenes and terrors that one will face (at death) are very severe; and the good fortune of a servant is that he is granted a long life and that Allah Almighty blesses him with the ability to repent and turn (to Him)."
Abu Bakr bin Abi Shaybah, Ahmad bin Mani', Abd bin Humayd, Abu Ya'la al-Mawsili, Ahmad bin Hanbal and al-Bayhaqi recorded it, while Imam al-Hakim declared it sahih.
It is narrated from Sayyidah Umm al-Fadl (may Allah be pleased with her) that the Prophet (peace and blessings be upon him) came to them while the uncle of the Messenger of Allah (peace and blessings be upon him), Sayyiduna Abbas (may Allah be pleased with him), was suffering from illness. Sayyiduna Abbas (may Allah be pleased with him) wished for death, so the Messenger of Allah (peace and blessings be upon him) said to him: "O uncle of the Messenger of Allah! Do not wish for death. For if you are a doer of good, the delay of your life (a longer life) is better for you, as it will further increase your good deeds; and if you are a sinner, the lengthening of your life is better for you so that you may repent of your evil deeds and seek Allah's pleasure. So do not wish for death."
Abu Bakr bin Abi Shaybah recorded this hadith, and its narrators are thiqat (trustworthy). Al-Harith, Abu Ya'la, Ahmad bin Hanbal and al-Hakim also recorded it, and al-Hakim declared it sahih; while Imam Ahmad, al-Bukhari and al-Nasa'i also recorded it from the hadith of Sayyiduna Abu Hurayrah (may Allah be pleased with him).
Hadith Takhrij«رواه أبو بكر بن أبي شيبة ورجاله ثقات، والحارث، وأبو يعلى وأحمد بن حنبل، والحاكم وصححه» «أخرجه مسند أحمد برقم: 26333، وأخرجه المستدرك على الصحيحين برقم: 1294، وأخرجه مجمع الزوائد ومنبع الفوائد برقم: 17541»