Sunan an-Nasa'i 1822
سنن النسائي#1822SahihIt was narrated that Anas said:"The Messenger of Allah said: 'Do not pray for death or wish for it. Whoever insists on praying for it let him say: Allahumma ahini ma kanatil-hayatu khairanli wa tawaffani idha kanatil-wafatu khairanli (O Allah, keep me alive so long as life is good for me, and cause me to die when death is good for me)
Scholarly Authentication
We show the most cautious grade (weakest-wins) as the overall label. Individual scholars graded it as follows:
Abu GhuddahSahih Isnaad
Al-AlbaniSahih Isnaad
Zubair Ali ZaiSahih - Agreed Upon
In-book reference: 21:5