The Messenger of Allah (ﷺ) as saying: No one of you should wish for death for any calamity…

Sunan Abu Dawud Book 21 Hadith 20

Sunan Abu Dawud #3108

Funerals (Kitab Al-Jana'iz) 21:20

Narrated Anas:

The Messenger of Allah (ﷺ) as saying: No one of you should wish for death for any calamity that befalls him, but he should say: O Allah! cause me to live so long as my life is better for me ; and cause me to die where death is better for me.

Chapter: It Is Disliked To Wish For Death

Grade: Sahih (Al-Albani)