All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu 'alyhi wa sallam, is His slave and Messenger.
There are four possible cases of calling upon the Prophet, sallallaahu ‘alayhi wa sallam, by saying, “O Messenger of Allaah.” The first case is when the person means to seek the help of the Prophet, sallallaahu ‘alayhi wa sallam, by saying, for instance, “O Messenger of Allaah, relieve my grief and grant me health,” or anything of the sort. This is Shirk (polytheism) because the supplication is directed to other than Allaah The Almighty while seeking that which only He can fulfill. It is known that supplication is an act of worship that should be dedicated only to Allaah The Almighty who Says (what means): {And your Lord says, "Call upon Me; I will respond to you." Indeed, those who disdain My worship will enter Hell [rendered] contemptible.} [Quran 40:60] Also, the Prophet, sallallaahu ‘alayhi wa sallam, mentioned that supplication is worship. [At-Tirmithi] Hence, any supplication which is addressed to anyone other than Allaah The Almighty is Shirk, as He Says (what means): {And when they board a ship, they supplicate Allaah, sincere to Him in religion. But when He delivers them to the land, at once they associate others with Him.} [Quran 29:65] This means that they supplicate others with Him after sincerely supplicating Him alone while they were at sea.
The second case is to make Tawassul (seeking a means of nearness), like when a person says, “O Messenger of Allaah, intercede with Allaah on my behalf,” or, “Be my intercessor with your Lord to relieve my grief,” and so on. This is a prohibited kind of Tawassul. Shaykh Muhammad ibn Saalih Al-‘Uthaymeen mentioned that Tawassul through the Prophet, sallallaahu ‘alayhi wa sallam, is classified into three categories:
The first is to make Tawassul through one’s belief in the Prophet, sallallaahu ‘alayhi wa sallam, and being his follower. This kind of Tawassul was permissible during the life of the Prophet, sallallaahu ‘alayhi wa sallam, and is permissible after his death.
The second is to make Tawassul through the supplication of the Prophet, sallallaahu ‘alayhi wa sallam, meaning, by asking him to supplicate to Allaah The Almighty on one’s behalf. This kind of Tawassul was only permissible in the life of the Prophet, sallallaahu ‘alayhi wa sallam, but not after his death because it then became impossible.
The third is to make Tawassul through the honor and status of the Prophet, sallallaahu ‘alayhi wa sallam. This kind of Tawassul is prohibited, both during his life and after his death because the honor and status of the Prophet, sallallaahu ‘alayhi wa sallam, are not part of his deeds, while it is only permissible to make Tawassul by the deeds of the person.
It is impermissible to ask the Prophet, sallallaahu ‘alayhi wa sallam, at his grave to supplicate to Allaah The Almighty to forgive a person or to intercede on his behalf with Him. If someone argues that this kind of Tawassul is permissible because of the verse (what means): {And if, when they wronged themselves, they had come to you, [O Muhammad], and asked forgiveness of Allaah and the Messenger had asked forgiveness for them, they would have found Allaah accepting of repentance and Merciful.} [Quran 4:64], we answer that it is true that Allaah The Almighty says this but according to the rules of the Arabic language, the verse is referring to an incident that occurred during the life of the Prophet, sallallaahu ‘alayhi wa sallam. After his death, this became impossible because when a person dies, his deeds stop and thus, he cannot ask Allaah The Almighty to forgive anyone, not even himself.
The third possible case of calling upon the Prophet, sallallaahu ‘alayhi wa sallam, by saying, “O Messenger of Allaah,” is to invoke peace and blessings upon the Prophet, sallallaahu ‘alayhi wa sallam, like when one says, “O Messenger of Allaah, may Allaah exalt your mention.” This is recommended.
The fourth and final case is to mention the merits of the Prophet, sallallaahu ‘alayhi wa sallam, and regret the bad things that took place after his death, like saying, “O Messenger of Allaah, you reformed and guided mankind to the right path, if you could only see what happened after your death!” This is permissible provided that it is not accompanied by loud crying or tearing one’s clothes, otherwise, it will be considered wailing, which is prohibited.
However, if someone argues that doing this is not prohibited because of the Hadeeth that mentioned that every wailer is a fraud except the one who wailed for Hamzah we answer that this is a weak Hadeeth, and even if it is authentic, then what is mentioned at the end of it abrogates it as it states that the Prophet, sallallaahu ‘alayhi wa sallam, got on the pulpit the next day and strictly prohibited wailing.
Allaah Knows best.