Abu Hurairah reported,

I heard the Messenger of Allah ﷺ say, "No one's deeds will admit him to Paradise."They asked, "Not even you, Messenger of Allah?"He replied, "Not even me, unless Allah envelops me in His grace and mercy. So aim for what is right, draw near to it, and let none of you wish for death. If he is a doer of good, perhaps he will increase in goodness, and if he is a wrongdoer, perhaps he will seek to make amends."

Bukhari 5673

Sahih

حدثنا أبو اليمان أخبرنا شعيب عن الزهري قال أخبرني أبو عبيد مولى عبد الرحمن بن عوف أن

أبا هريرة قال

سمعت رسول الله ﷺ يقول لن يدخل أحدا عمله الجنة قالوا ولا أنت يا رسول الله قال لا ولا أنا إلا أن يتغمدني الله بفضل ورحمة فسددوا وقاربوا ولا يتمنين أحدكم الموت إما محسنا فلعله أن يزداد خيرا وإما مسيئا فلعله أن يستعتب

البخاري 5673صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Sick
Chapter
Wishing for death by the sick person
Numbering
Darussalam 5673
Bukhari 5673