Language:
كتاب الدعوات
80  
Invocations
(30)
Chapter: The invocation for death or life
(30)
باب الدُّعَاءِ بِالْمَوْتِ وَالْحَيَاةِ
Sahih al-Bukhari 6349

Narrated Qais:

I came to Khabbab who had been branded with seven brands(1) and he said, "Had Allah's Messenger (ﷺ) not forbidden us to invoke (Allah) for death, I would have invoked (Allah) for it."

حَدَّثَنَا مُسَدَّدٌ، حَدَّثَنَا يَحْيَى، عَنْ إِسْمَاعِيلَ، عَنْ قَيْسٍ، قَالَ أَتَيْتُ خَبَّابًا وَقَدِ اكْتَوَى سَبْعًا قَالَ لَوْلاَ أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم نَهَانَا أَنْ نَدْعُوَ بِالْمَوْتِ لَدَعَوْتُ بِهِ‏.‏
Reference : Sahih al-Bukhari 6349
In-book reference : Book 80, Hadith 46
USC-MSA web (English) reference : Vol. 8, Book 75, Hadith 360
  (deprecated numbering scheme)