Muslims have a very positive view of life and death. Life on earth is temporary. Death is the door through which one enters into everlasting life. Muslims do not see death as something scary or frightful. Death is the way one returns to Allah. God says in the Qur'an:
Say: The angel of death, who has been given charge of you, will carry off your souls. Then to your Lord you shall all return (Qur'an 32:11).
Muslims hopeful of God's mercy look forward to the day when God will address them as stated in the Qur'an:
O peaceful and fully satisfied soul, return to your Lord: you are well-pleased (with your good end) and well-pleasing (in the sight of your Lord). Join My (righteous) servants and enter my Paradise (Qur'an 89: 27-30).
Viewed in this way, death becomes a joy for the true believer. This view of death was further explained in a saying of the Prophet, on whom be peace. He said:
Allah loves to meet whoever loves to meet Him.
It is true that no one likes to die. But the prophet, on whom be peace, said:
When death comes to a believer, he is given good news of the pleasure of Allah and his gifts. There is then nothing dearer to him than what is ahead of him. So he loves to meet Allah, and Allah loves to meet him (This was reported by Bukhari and Muslim).
This positive view of death should not imply a negative view of life. Life should be lived to its fullest, and believers should not wish for an end to their lives. The prophet said; no believer should wish for death, for, as long as there is life in you, if you are righteous, perhaps you may increase your good deeds, and if you are sinful, perhaps given time you may repent (reported by Bukhari).
God in His plan devised this earthly life as a temporary life. The earth is a testing ground. Those who accept God's guidance in this life will be given the abundance of God's grace in the next, the everlasting life. When God decreed for humans to live on the earth, He declared:
Henceforth there shall come to you guidance from Me now and again; whoever will follow it shall have neither fear nor sorrow, and whoever will refuse to accept it and defy Our Revelation, they shall be doomed to the Fire wherein they shall remain forever (Qur'an 2:38-39).
Again, God says that He "created life and death so that He may try you, which of you is best in conduct" (Qur'an67:2).
God says further:
Indeed We created man from a mixed drop to try him and therefore We made him capable of hearing and seeing. We showed him the way, whether to be grateful or disbelieving (Qur'an 76:2-3; see also 90;8- 10).
In this life we should use our God-given faculties to learn and follow God's message. The Qur'an says that those who end up being punished for their sins will regret that they neither listened nor used their brains when God's message had reached them (see Qur'an 67:10).
Incidentally, in the Qur'an it is not said that God warned Adam and Eve of death if they ate from the forbidden tree. What God actually said to them was that if they ate from the tree they would become wrongdoers (see Qur'an 2:35). Given the Qur'anic viewpoint, there is no reason to consider death as a consequence for sin.