Gender, not really. Based on my mom and especially my sister's personalities I am pretty sure I'd still want to kill myself if I was female maybe even more so.
Sexuality on the other hand, maybe. I'm rigidly heterosexual which I know is probably no cause for suicide in most people but unfortunately my personality just isn't suited for this orientation. How else can one explain me being a kissless virgin at 29 despite being six feet tall and with decent looks according to so many people (btw I think they are wrong about my looks they just don't care enough to see my uglier details on my face). It's because from what I can tell, more than anything else be it looks, height, muscle mass, even wealth, the main thing heterosexual women are attracted to most about heterosexual men is their confidence. I imagine this is why many seem to fawn over serial killers and horror movie slashers is because those guys at least had the confidence to do what they set out to do. They have an unrivaled amount of ambition and drive that I could never hope to match.
But yeah, my tendency to be very submissive and cowardly and avoidant just doesn't do me any favors with women. That's why I often say I wish I was gay or even just a little bisexual. I'm not even comfortable enough with partnering with any trans females or femboys sadly. It's disgusting how phobic I am but I can't help that I'm only attracted to biological women. Unfortunately I've had so many guys try to flirt with me or openly confess to me and I always feel so shitty for having to reject them. One former best friend I had came out of the closet to me first (this was back in 2012) before anyone else because he thought I must be gay too but unfortunately, I'm just not. He later tried touching my shoulders and thighs to see if it would do anything for me and unsurprisingly it didn't. Now if a woman had molested me I would probably still be a little disturbed by it but at least I might have been less grossed out by it. I know I'm not asexual either because I still feel sexual attraction but just towards female body parts. The male ones disgust me personally which is why I can't be gay but man, if I was I probably could have at least found a good romantic partner now. I know being gay comes with a slew of systemic and other social disadvantages but I actually live in California where that's far less of a big deal than it is in other parts of the world so i feel like it'd be okay for me. Sadly I can't change myself to be gay no more than a gay person can change to be straight. And yet my straightness is exactly what's causing me to want to kill myself because my personality makes me functionally incapable of romancing any women I happen to fall for and even when they approach me I've still screwed it up for myself by being my shy and weak-willed self.