Sunan Abi Dawud, Hadith 3251

Narrated Thabit bin Adh-Dahhak: That he took oath of allegiance to the Messenger of Allah under the tree. The Messenger of Allah said: If anyone swears by religion other than Islam falsely, he is like what has has said. If anyone kills himself with something, he will be punished with it on the Day of Resurrection. A vow over which a man has no control is not binding on him.

حَدَّثَنَا أَبُو تَوْبَةَ الرَّبِيعُ بْنُ نَافِعٍ، حَدَّثَنَا مُعَاوِيَةُ بْنُ سَلاَّمٍ، عَنْ يَحْيَى بْنِ أَبِي كَثِيرٍ، قَالَ أَخْبَرَنِي أَبُو قِلاَبَةَ، أَنَّ ثَابِتَ بْنَ الضَّحَّاكِ، أَخْبَرَهُ أَنَّهُ، بَايَعَ رَسُولَ اللَّهِ صلى الله عليه وسلم تَحْتَ الشَّجَرَةِ أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ ‏ "‏ مَنْ حَلَفَ بِمِلَّةٍ غَيْرِ مِلَّةِ الإِسْلاَمِ كَاذِبًا فَهُوَ كَمَا قَالَ وَمَنْ قَتَلَ نَفْسَهُ بِشَىْءٍ عُذِّبَ بِهِ يَوْمَ الْقِيَامَةِ وَلَيْسَ عَلَى رَجُلٍ نَذْرٌ فِيمَا لاَ يَمْلِكُهُ ‏" ‏ ‏.‏

sunnah.com

also referenced under: Hadith 3257 (DarusSalam)