Anas bin Malik reported,

Were it not that the Messenger of Allah ﷺ said, "None of you should wish for death," I would have wished for it.

Muslim 6816

Sahih

حدثني حامد بن عمر حدثنا عبد الواحد حدثنا عاصم عن النضر بن أنس وأنس يومئذ حي

قال أنس

لولا أن رسول الله ﷺ قال لا يتمنين أحدكم الموت لتمنيته

مسلم 6816صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Remembrance, supplication, Tawba, and seeking forgiveness
Chapter
Dislike of wishing for death due to hardship that has befallen one
Numbering
Darussalam 6816
Muslim 6816