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 (ﷺ) under the Tree) said:
The Messenger of Allah (ﷺ) 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].
App reference: Book 18, Hadith 41
Arabic/English book reference: Book 18, Hadith 1551