Sulaym bin Jubayr reported,

The Messenger of Allah ﷺ said, "None of you should wish for death or pray for it before it comes to him, unless he is certain of his own deeds. For if one of you dies, his deeds come to an end, and a believer's life only adds to his good."

Ahmad 8607

Sahih

وبإسناده عن رسول الله ﷺ قال لا يتمنى أحدكم الموت ولا يدعو به من قبل أن يأتيه إلا أن يكون قد وثق بعمله فإنه إن مات أحدكم انقطع عنه عمله وإنه لا يزيد المؤمن عمره إلا خيرا

أحمد 8607صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Abu Hurairah
Numbering
Darussalam 8607
Ahmad 8607