If you're committing suicide in space, why do you care if there's a hole in the hull of the spacecraft?
If there's explosive decompression, you might leave the survivors with a longer, more stressful and painful death.
If the gunshot creates shrapnel or propels the gun away, it might create additional hardship for the remaining crew.
I don't think this is an ideal mechanism.