(4) باب كَرَاهَةِ تَمَنِّي الْمَوْتِ لِضُرٍّ نَزَلَ بِهِ
Hammam b. Munabbih said:
Abu Huraira narrated to us ahadith from Allah's Messenger (ﷺ) and out of these one is that Allah's Messenger (ﷺ) said: None amongst you should make a request for death, and do not call for it before it comes, for when any one of you dies, he ceases (to do good) deeds and the life of a believer is not prolonged but for goodness.
Reference: Sahih Muslim 2682
In-book reference: Book 48, Hadith 15
USC-MSA web (English) reference(deprecated numbering scheme): Book 35, Hadith 6485