Language:
كتاب التمنى
94  
Wishes
(6)
Chapter: What kind of wishing is disliked
(6)
باب مَا يُكْرَهُ مِنَ التَّمَنِّي
Sahih al-Bukhari 7234

Narrated Qais:

We went to pay a visit to Khabbab bin Al-Art and he had got himself branded at seven spots over his body. He said, "If Allah's Messenger (ﷺ) had not forbidden us to invoke Allah for death, I would have invoked for it."

حَدَّثَنَا مُحَمَّدٌ، حَدَّثَنَا عَبْدَةُ، عَنِ ابْنِ أَبِي خَالِدٍ، عَنْ قَيْسٍ، قَالَ أَتَيْنَا خَبَّابَ بْنَ الأَرَتِّ نَعُودُهُ وَقَدِ اكْتَوَى سَبْعًا فَقَالَ لَوْلاَ أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم نَهَانَا أَنْ نَدْعُوَ بِالْمَوْتِ لَدَعَوْتُ بِهِ‏.‏
Reference : Sahih al-Bukhari 7234
In-book reference : Book 94, Hadith 9
USC-MSA web (English) reference : Vol. 9, Book 90, Hadith 340
  (deprecated numbering scheme)