Jami` at-Tirmidhi 970
Grading supplied with this record: Sahih (Darussalam)
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
لاَ يَتَمَنَّيَنَّ أَحَدُكُمُ الْمَوْتَ لِضُرٍّ نَزَلَ بِهِ وَلْيَقُلِ اللَّهُمَّ أَحْيِنِي مَا كَانَتِ الْحَيَاةُ خَيْرًا لِي وَتَوَفَّنِي إِذَا كَانَتِ الْوَفَاةُ خَيْرًا لِي ."
Harithah bin Mudarrib said:
"I entered upon Khabab and he had been cauterized on his stomach. He said: 'I do not know any of the Companions of the Prophet who met with the trial I have met with. Indeed I could not find a Dirham during the time of the Prophet, and (now) outside my house there are forty thousand. If it were not that the Messenger of Allah forbade us' - or: 'forbade' - 'from wishing for death, then I would wish for it.'"
Full reference and source
Jami` at-Tirmidhi 970 In-book : Book 10, Hadith 6 English translation : Vol. 2, Book 5, Hadith 970
View source on Sunnah.com (opens in a new tab)