Sahih Muslim
2680.01

Anas (b. Malik) reported Allah's Messenger (ﷺ) as saying. None of you should make a request for death because of the trouble in which he is involved, but if there is no other help to it, then say:O Allah, keep me alive as long as there is goodness in life for me and bring death to me when there is goodness in death for me

2680.02

This hadith has been narrated on the authority of Anas through another chain of transmitters, but with a small variation of wording

2680.03

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