Abu Zaid Thabit bin Ad-Dahhak Al-Ansari (May Allah be pleased with him( (he is one of those who gave their pledge of allegiance to the Messenger of Allah (PBUH) under the Tree) said: The Messenger of Allah (PBUH) said, "He who swears by a religion other than that of Islam, is like what he has professed. He who kills himself with something, will be tormented with it on the Day of Resurrection. A person is not bound to fulfill a vow about something which he does not possess. Cursing a believer is like murdering him."[Al-Bukhari and Muslim].
"He who swears by a religion other than that of Islam" here means either of the two things stated here. For instance, if a person says: "If I do such and such, then I am a Christian or a Jew." Now if he really intends to embrace Christianity or Judaism, he will immediately become so because his intention to be a Kafir (disbeliever) is Kufr (infidelity) in itself. But if the vow is meant to deny the adoption of other religions and is intended to express his firm resolution to live as a Muslim to the last even then such a vow is undesirable and is a sin for which one must seek Allah's forgiveness.
The last sentence of this Hadith evidently shows that to curse a Muslim is forbidden because it is akin to killing him.