Sahih Bukhari Volume 008, Book 075, Hadith Number 362.

Narated By Anas : Allah's Apostle said," None of you should long for death because of a calamity that had befallen him, and if he cannot, but long for death, then he should say, 'O Allah! Let me live as long as life is better for me, and take my life if death is better for me.'"