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

Narrated Anas:

If I had not heard the Prophet (ﷺ) saying, "You should not long for death," I would have longed (for it).

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