It depends on why you are fighting. At the Alamo, their efforts allowed the Texan Army time to prepare for war. Their deaths served a purpose. Likewise if you are facing an enemy which tortures / kills their pows, like the japs did in WW2. I could see fighting to the death, because you would weaken the enemy, and your fate most likely would not be changed by the continued fighting.
By the end of WW2, there was no purpose to keep fighting. The Military leaders of Japan were willing to see millions killed, just to delay surrender. The Japanese Leaders could see how we treated the germans and our own POWs. Yet they preferred to keep fighting and many wanted to even after we dropped the nukes.
Suppose things had turned out different.
Germany and Japan win in Europe/Asia and attack the US.
Facing overwhelming odds, do we fight to the death, or meekly surrender?