Sad part is, it's not that the Germans really wanted to surrender that much. Granted, Donitz and Jodl kept saying that they did that because of how relieved they were to know that Adolf shot himself. Maybe, maybe not. Germany had simply no other option to go, and faced with going down the way of the dodo many separate German forces started surrendering, culuminating at main instrument of surrender signed at Reims.

Hard not to shoot yourself when your entire worldview (Trimph of German Ubermenschen, Adolf as the best military genius in history, unstoppable German army, etc etc) crashes down and crashes hard. Couple this with fear of Bolshevism and fear of Allied persecution (strongly emphasized by German propaganda that showed Allied forces as nothing more than brutal savages hell bent on tearing everyone apart) and you've got a recipe for disaster.
Bear in mind that in 1940 that nation felt like being at the forefront of humanity with half of Europe under their feet. My grandfather was working as forced labor for the Germans on territory of the Third Reich and the level of humiliation and pain he received from the bauer he worked for was immeasurable. What he saw was fanaticism to the n-th degree coupled with unwavering belief in German military, scientific and political might.

Boo fucking hoo, all of this suddenlys tarted tumbling down. First the idiocy on Eastern Front, then mangled attack on Britain, then the U.S. decided to step into the ring after Pearl Harbor and Lend-lease kicked in gear. Meanwhile a string of conferences between the Big Three. And Adolf quickly ran out of options. Work on Wunderwaffe was dwindling with limited resources. Vergeltungswaffen were good, but the payload they carried could not help the Germans and having executed almost all Jewish scientists Hitler was simply out of brainpower to progress with atom project, Uranverein was struggling from day one. Also jet fighters and their small numbers coupled with technical issues and sabotage by forced labor in their factories...

Now fast forward to Fall of Berlin. Country torn apart between allied armies. Uncovered truth about Holocaust, American soldiers breaking down and crying when liberating the death camps. The full horror of Nazism began to be seen.