(4) باب كَرَاهَةِ تَمَنِّي الْمَوْتِ لِضُرٍّ نَزَلَ بِهِ
Nadr b. Anas reported, as when Anas was alive, that he said:
Had Allah's Messenger (ﷺ) not stated this.." None should make a request for death," I would have definitely done that.
Reference: Sahih Muslim 2680 c
In-book reference: Book 48, Hadith 12
USC-MSA web (English) reference(deprecated numbering scheme): Book 35, Hadith 6482