What would you do? I personally (Backed into a corner, nowhere else to go.) would likely try to kick my way out (freakishly long legs), and if need be, shoot the nearest zed, then run like hell.
Don't give up the fight, even if all hope of aid is lost. I would aim for the head, and hope I don't miss. I would never take out myself unless everyone I knew was dead and I was on the brink of being dead myself.
I will do all that I can to survive and fight, but, if it came to it, I WOULD shoot myself. I will serve my purpose of protecting those around me, and if that means deciding to deny the walking dead one more "recruit", so be it. I will die with uncorrupted valor; my pride will not be your downfall.