I'd have to say no. I don't like the suggested theme of suicide even in a game. There are other effective alternatives that you could do instead. Also we don't know if you'll turn into a zombie when you die.
The one problem I see is you would have to have it a special set of keys otherwise you could accidentally shoot your self by hitting the wrong button; Or as an alternative mash "space" after pushing "J" and then you would shoot.
you would have to find a handgun, parts to fix it and ammo; after that i think you would have found a better place. That is unless you can do it with a knife; because then you just have to find a building and your set.
It can add to the immersion, picture this, you're surrounded by zombies and no way out, you messed up and now you're going to pay, do you let those monsters tear you limb from limb or do you take your own life to not face the grim alternative.
Maybe the only suicide option should be if you have very bad mental health.
In other words, say your mental health is very low, and you come across and kill another survivor. You kind of go into an animation where you walk away slowly, hearing voices in your head, and all of a sudden stop, and put a bullet in your head!!!