Muhammad tried to commit suicide more than once, out of grief for the death of Waraka Ibn Nawfal. He was training him and translating The Old Testament and the Bible for him. After his death the visits of the revelation became rare. So, Muhammad tried to get rid of his life. The devil's worshippers wonder how Prophet Muhammad could think of such a horrible sin, trying to prove that lie with a hadith in Sahih Al-Bukhari.
Repelling off the Libel:
We should first mention the books that tell that story:
1) The trusted narrations):
AlSayeda A'esha in (Sahih AlBukhary)
AlSayeda A'esha in (AbdulRazzak book)
AlSayeda A'esha in (Musnad Ahmad)
2) The weak narrations:
Ibn Abbas in (AlThurreyah AlTaherah)
It was narrated by Othman Ibn Ataa who was categorized by the Hadith specialists to be weak and telling made up ahadith. AlDarcotni said that he was trusted as a person, but he never met Ibn Abbas.
Moreover, AlBukhary categorized him among the weak narrators and Ibn AlMusayeb denied his narration.
3) That hadith includes a weak part which is the narrator's words:
The Revelation's visits became rare and the Prophet PBUH was very sad…..etc. In that part he mentioned that the Prophet fell off the high mountains. This part was not narrated in the hadith in the following trusted hadith referrals:
Sahih AlBukhari Sahih Muslim Musnad Ahmad
That extra part is too weak to be trusted. For, the Prophet never said I tried to commit suicide. AlSayeda A'esha didn't say that either. So, if Urwa Ibn Masoud narrated the hadith after he learnt it from AlSayeda A'esha he wouldn't say (We were informed). All these clues deny the existence of that made up part in the hadith. It was not said by any of the Prophet's companions or followers. So, it is rootless and can't be said by the Prophet.
4) The clause (We were informed) was deliberately added to the hadith. But nobody knows who added it or why.
5) As to the credibility of that story and its origins, they are completely confused. The Prophet's personality was all the time well- known as stable and confident. How could such a balanced person try to kill him self? He was brave and accomplished. Even before the Islamic Message he was saved by Allah to be able to carry such a heavy burden. No bad deeds or pre-Islamic habits were proved to be done by him.