Did the Prophet endorse suicide ?

In the name of Allah most gracious most merciful
Assalaamualaikum wa rahmatuallahi wa barakatahu

Sucide in Jihad? And Martyrdom Attacks

Some anti-islamic elements intepret the below hadith as prophet supporting sucide in jihad.

Volume 9, Book 83, Number 29: Narrated Salama:

We went out with the Prophet to Khaibar. A man (from the companions) said, "O 'Amir! Let us hear some of your Huda (camel-driving songs.)" So he sang
some of them (i.e. a lyric in harmony with the camels walk). The Prophet said, "Who is the driver (of these camels)?" They said, "Amir." The Prophet
said, "May Allah bestow His Mercy on him !" The people said, "O Allah's Apostle! Would that you let us enjoy his company longer!" Then 'Amir was
killed the following morning. The people said, "The good deeds of 'Amir are lost as he has killed himself." I returned at the time while they were
talking about that. I went to the Prophet and said, "O Allah's Prophet! Let my father be sacrificed for you! The people claim that 'Amir's good deeds
are lost." The Prophet said, "Whoever says so is a liar, for 'Amir will have a double reward as he exerted himself to obey Allah and fought in Allah's
Cause. No other way of killing would have granted him greater reward.

The simple answer to this is Hadith exegesis.Cross referenced hadith collection.Just like Quran, in Hadith as well certain parts of it explain
certain other parts of the information.

by reading the below hadith

Sahih al-Bukhari, Volume 5, Book 59, Number 509:
Narrated Salama bin Al-Akwa:

We went out to Khaibar in the company of the Prophet. While we were proceeding at night, a man from the group said to 'Amir, "O 'Amir! Won't you
let us hear your poetry?" 'Amir was a poet, so he got down and started reciting for the people poetry that kept pace with the camels' footsteps,
saying:-- "O Allah! Without You we Would not have been guided On the right path Neither would be have given In charity, nor would We have prayed. So
please forgive us, what we have committed (i.e. our defects); let all of us Be sacrificed for Your Cause And send Sakina (i.e. calmness) Upon us to make
our feet firm When we meet our enemy, and If they will call us towards An unjust thing, We will refuse. The unbelievers have made a hue and Cry to ask
others' help Against us." The Prophet on that, asked, "Who is that (camel) driver (reciting poetry)?" The people said, "He is 'Amir bin Al-Akwa'."

Then the Prophet said, "May Allah bestow His Mercy on him." A man amongst the people said, "O Allah's Prophet! has (martyrdom) been granted to him.
Would that you let us enjoy his company longer." Then we reached and besieged Khaibar till we were afflicted with severe hunger. Then Allah
helped the Muslims conquer it (i.e. Khaibar). ... So when the army files were arranged in rows (for the clash), 'Amir's sword was short and he aimed
at the leg of a Jew to strike it, but the sharp blade of the sword returned to him and injured his own knee, and that caused him to die. When they
returned from the battle, Allah's Apostle saw me (in a sad mood). He took my hand and said, "What is bothering you?" I replied, "Let my father and mother
be sacrificed for you! The people say that the deeds of 'Amir are lost." The Prophet said, "Whoever says so, is mistaken, for 'Amir has got a double
reward." The Prophet raised two fingers and added, "He (i.e. Amir) was a persevering struggler in the Cause of Allah and there are few 'Arabs who
achieved the like of (good deeds) 'Amir had done."

....We ordained for the Children of Israel that if any one slew a person - unless it be for murder or for spreading mischief in the land, it would be
as if he slew the whole people; and if any one saved a life, it would be as if he saved the life of the whole people. Then although there came to them
Our Apostles with clear signs, yet, even after that, many of them continued to commit excesses in the land." [Qur'an 5:33]

Thus saving of life is very important in Islam.And prophet never approved sucides in jihad or otherwise.
Martyrdom attacks are permitted as their intention is to kill the enemies with it the Jihadi also knows he will also be killed.For example Al-Baraa ibn Malik al-Ansari- The Muslims displayed tremendous feats of heroism. Thabit ibn Qays, the standard bearer of the Ansar, dug a pit and planted himself in it and fought until he was killed. The pit he dug turned out to be his grave. http://www.usc.edu/dept/MSA/history/biographies/sahaabah/bio.AL_BARAA_IBN_MALIK_AL_ANSARI.html

Allah knows best.