Sahih Muslim Book 001, Hadith Number 0211.
Chapter : Argument in favour of the fact that he who kills himself does not become unbeliever.
It is narrated on the authority of Jabir that Tufail son of Amr al-Dausi came to the Apostle (may peace be upon him) and said: Do you need strong, fortified protection? The tribe of Daus had a fort in the pre-Islamic days. The Apostle (may peace be upon him) declined this offer, since it (the privilege of protecting the Holy Prophet) had already been reserved for the Ansar. When the Apostle(may peace be upon him) migrated to Medina, Tufail son of Amr also migrated to that place, and there also migrated along with him a man of his tribe. But the climate of Medina did not suit him, and he fell sick. He felt very uneasy. So he took hold of an iron head of an arrow and cut his finger-joints. The blood streamed forth from his hands, till he died. Tufail son of Amr saw him in a dream. His state was good and he saw him with his hands wrapped. He (Tufail) said to him: What treatment did your Allah accord to you? He replied. Allah granted me pardon for my migration to the Apostle(may peace be upon him): He (Tufail) again said: What is this that I see you wrapping up your hands? He replied: I was told (by Allah): We would not set right anything of yours which you damaged yourself. Tufail narrated this (dream) to the Messenger of Allah (may peace be upon him). Upon this he prayed: O Allah I grant pardon even to his hands.