Riyad as-Salihin, Book 18, Hadith 1551 (In-Book)

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].

عن أبي زيد ثابت بن الضحاك الأنصاري رضي الله عنه، وهو من أهل بيعة الرضوان قال‏:‏ قال رسول الله صلى الله عليه وسلم ‏:‏ ‏ "‏من حلف على يمين بملة غير الإسلام كاذبًا متعمدًا، فهو كما قال، ومن قتل نفسه بشيء، عُذب به يوم القيامة، وليس على رجل نذر فيما لا يملكه، ولعن المؤمن كقتله‏" ‏ ‏(‏‏(‏متفق عليه‏)‏‏)‏‏.‏

sunnah.com