Anas reported God's messenger as saying, "None of you must wish for death because he is afflicted by evil circumstances, but if he cannot help doing so he should say, ‘O God, give me life as long as life is better for me, and take me when death is better for me.’ ”
He reported God’s messenger as saying, "None of you must wish or pray for death before it comes to him. When one dies his hope is cut off, but the continued life of a believer only brings him more good.”
‘Ubada b. as-Samit reported God's messenger as saying, "If anyone wishes to meet God, God wishes to meet him; but if anyone does not wish to meet God, God does not wish to meet him.” When ‘A'isha or one of his wives said she did not want to die, he replied, "That is not what I mean; but when death comes to a believer he is given glad tidings of God’s good pleasure and regard, so nothing is dearer to him than what lies before him, and he wishes to meet God and God wishes to meet him. But when an infidel approaches death he is given tidings of God’s punishment and chastisement, so nothing is more objectionable to him than what lies before him, and he does not wish to meet God and God does not wish to meet him.” In ‘A’isha's version it says that death precedes the meeting with God.
Abu Huraira reported God’s messenger as saying, "None of you must wish for death; neither one who does well, for perhaps he may do still more good, nor one who does ill, for perhaps he may seek to please God.”