We are talking about 175-180 suicides of the Nazi leadership, from Hitler down to individual Reichstagsabgeordnete and high ranking Officers (from cursory reading: Significantly more suicides in the Waffen-SS than the Wehrmacht), some Mayors etc. There were probably thousands, maybe low ten thousands of people with similar rank and standing who did not commit suicide. It should also be noted that there was a wave of suicides in the general population around the immediate end of the war and a decision about wether a specific suicide was by a leader will always be a bit subjective.
Also even in the last days of the war, some Wehrmacht and Volkssturm units still tried to fight off the Allies, that the Nazis persecuted deserters right until the end (The judges who signed the execution warrants as a rule didnt commit suicide and often had successful post-war careers.). I would see this stubborness in fighting (and murdering, see the death marches) on even after the war was clearly lost on the same spectrum as the suicides: The inability to simply quit fighting and murdering and going into captivity.
As for reasons, Tom Au suggests persecution and the fact that the Nazis did not conduct themselves honourably by the measures of their time. I don't think that's wrong, but I would suggest another approach.
In the very militarized, apocalyptic worldview of the Nazis, there was only victory or armageddon. Their vision of total war was a war between the totality of the individual peoples. I don't think they could really conceive of a post war order, after losing their war, in which a recognizable Germany would exist.
Also, fascism is a death cult, or rather a
cult of heroism [that] is strictly linked with the cult of death. It is not by chance that a motto of the Falangists was Viva la Muerte (in English it should be translated as “Long Live Death!”). In non-fascist societies, the lay public is told that death is unpleasant but must be faced with dignity; believers are told that it is the painful way to reach a supernatural happiness. By contrast, the Ur-Fascist hero craves heroic death, advertised as the best reward for a heroic life. The Ur-Fascist hero is impatient to die. In his impatience, he more frequently sends other people to death.
(Umberto Eco: Ur Fascism)
So one could look for these aspects - apocalyptic vision, cult of death - in the last known words from Nazi leaders before their suicides.
One should also add that while the Nazis had apocalyptic visions, many of those who killed themselves could probably have had decent careers in post-war Germany, at least in the west.