God was gracious to the believers when He raised up among them a Messenger from themselves who recites to them the verses (of His Book) and shows them His signs [in their selves and in the universe], purifies them [of their sins and deviations], and instructs them in the Book and the Wisdom. They were evidently in manifest misguidance before. (3:164)
God sent Messengers to guide people to the truth and so they could be purified of sin. Those who were enlightened by the Messengers found the way to the Divine Presence and attained the highest rank of humanity. In the words of Ibrahim Haqqi: "God declared that He could not be contained by the Heavens and Earth. He can be known and reached only through hearts." This is why Messengers led humanity to the knowledge of God.
Those who follow this guidance are touched by Him in their innermost selves, whether it is called heart, soul, or conscience, for only that can grasp God in His entirety. Minds cannot comprehend Him, and philosophy cannot reach Him. Therefore, the Prophets purified souls so they could be mirrors in which God might manifest Himself. Prophet Muhammad left us the Qur'an and Sunna to show us how to live in a way that fulfills the purpose for which the Prophets were sent.
Here, it is necessary to emphasize three points. First, Prophets were not ordinary men; rather, they were chosen men through whom God manifested Himself. God chose them and paid great attention to their upbringing so that they always would seek to gain His approval. Like his predecessors, Prophet Muhammad always pursued God's good pleasure. His last words were: "To Rafiq al-A'la (the Highest Abode)." His wife 'A'isha gives the following account of his last moments:
I was with him during his last moments. Whenever he became ill, he would ask me to pray for him and, expecting my prayer to be accepted through the blessing of his auspicious hand, I held his hand and prayed. During his last illness, I wanted to do the same and pray, when he suddenly withdrew his hand and said: "To Rafiq al-A'la." 
Second, the world always contains successors who devote their lives to disseminating truth. They should seek what the Prophets sought, preach what the Prophets preached, and strictly follow the Prophets in enjoining good and forbidding evil.
Third, death is not total annihilation, but rather a changing of worlds without completely breaking away from this one. Prophets' deaths are special. In the case of martyrs, whose spiritual degree is lower than a Prophet's, the Qur'an says: Say not of those slain in God's way: "They are dead," they are alive but you understand not (2:154). So we cannot say that Prophets are dead. Thus Prophet Muhammad did not die as we understand this word; he only changed places and passed into another dimension or degree of life.
Those who can penetrate other dimensions with their inner faculties experience different dimensions of time and space, see different creatures, and look into things and events from different viewpoints. We consider things and events according to the stream in which we are. Those who rise high enough to see all dimensions of this stream have the scope of their sight enlarged as they ascend higher. Thus their capacity and judgment when considering matters is more comprehensive. Such people might be sitting with us and, at the same time, in the presence of God's Messenger. While praying with us, some may be leading the same prayer in the Hereafter before the angels. There is a particular class of saints called abdal (substitutes). When one dies, he or she is replaced immediately with a new one who can see the Prophet whenever they wish. Jalal al-Din al-Suyuti, a sixteenth-century scholar, once said: "I have seen God's Messenger 28 times while awake."