The Prophet ﷺ said, "Whoever swears falsely by a religion other than Islam is as he has said. Whoever kills himself with something will be tormented with it in the Fire of Hell. Cursing a believer is like killing him, and accusing a believer of disbelief is like killing him."
عن النبي ﷺ قال: من حلف بملة غير الإسلام كاذبا فهو كما قال، ومن قتل نفسه بشيء عذب به في نار جهنم، ولعن المؤمن كقتله، ومن رمى مؤمنا بكفر فهو كقتله.
Bukhari reported it in the Book of Manners (6105), and Muslim in the Book of Faith (110), both from the hadith of Abu Qilaba, from Thabit bin Dahhak, and he related the hadith. The wording given is that of Bukhari, while Muslim's wording is abridged and does not include his statement, "And cursing a believer... etc."