Full Sharh — Riyad as-Salihin 872
عن أبي زيد ثابت بن الضحاك الأنصاري رضي الله عنه، وهو من أهل بيعة الرضوان قال: قال رسول الله صلى الله عليه وسلم : "من حلف على يمين بملة غير الإسلام كاذبًا متعمدًا، فهو كما قال، ومن قتل نفسه بشيء، عُذب به يوم القيامة، وليس على رجل نذر فيما لا يملكه، ولعن المؤمن كقتله" ((متفق عليه)).
English Translation
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.".
Source
Riyad as-Salihin(رياض الصالحين)
The Book of the Prohibited actions
Hadith Number
872