‘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.
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.’ ”
Abu Qatada used to tell that when a funeral was brought past God’s messenger he said, "He is at rest, or others are at rest from him.” When asked what he meant by these words he replied, "The believing servant is at rest from the toil and harm of the world and departs to God’s mercy, but servants (i.e.. mankind), the country, the trees and the animals are at rest from the profligate.”
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.”