In Nazi Germany (and other totalitarian regimes), many soldiers and politicians committed suicide (by cyanide pill) rather than be captured. Also, they would request to be shot rather than hanged. Why is this?

by criticalhit
Nesquika

Symbolically hanging is quite humiliating. Historically it was used against thieves, traitors and others that a self-respecting man would not want to be associated with. After all, hangings were often public.

Cyanide pills are supposed to kill rather quickly and without much pain (though I am not sure as to how true this is). Hanging on the other hand could be quite painful if you did not die immediately. Taking a pill would be far less intimidating so fear may be a factor in some minds. More importantly think of the context in which these pills would be taken. If you were captured, the enemy may interrogate, imprison, or torture you. Thus a pill would be a quick way out and would be readily on hand whereas a rope would not.

As for shooting, I'd imagine it would be perceived more as a soldier's death than hanging. I am unfamiliar with specific accounts where men would request such deaths or what options they were given.
Perhaps someone else can weigh in on that regard.