The Messenger of Allah ﷺ said, "None of you should wish for death. If he is a doer of good, he may increase his good deeds, and if he is a wrongdoer, he may yet seek to make amends."In another wording, "None of you should wish for death, nor pray for it before it comes to him. When one of you dies, his deeds come to an end, and the believer's life only increases him in goodness."
أن رسول الله ﷺ قال: لا يتمنى أحدكم الموت إما محسنا فلعله يزداد، وإما مسيئا فلعله يستعتب وفي لفظ: لا يتمنى أحدكم الموت، ولا يدع به من قبل أن يأتيه، إنه إذا مات أحدكم انقطع عمله، وإنه لا يزيد المؤمن عمره إلا خيرا.
Bukhari narrated it in the Book of Wishing (7235) from Abdullah bin Muhammad, who said, Hisham bin Yusuf narrated to us, Mamar informed us, from Zuhri, from Abu Ubayd, whose name was Saad bin Ubayd, the freed slave of Abdul-Rahman bin Azhar, from Abu Hurairah, and he related it.Muslim narrated it in the Book of Remembrance and Supplication (2682) from Muhammad bin Rafi, who said, Abdul-Razzaq narrated to us, Mamar informed us, from Hammam bin Munabbih, who said, "This is what Abu Hurairah related to us," and he related it.There are other hadiths on this subject mentioned in the Book of Funerals.His saying, "yustatab," means he turns back from what warranted blame against him and seeks satisfaction. Al-istitab means seeking al-itab, that is, the removal of reproach.