I am ill in some ways, but my suicidal desire is not a direct result of mental illness, nor would it change if you magically fixed that which is wrong with me.
That said, I think it's a natural thing in some cases. I think it's a flaw in how we evolved, and perhaps the end point in intelligent evolution.
We became intelligent in order to survive better, a side effect of that is being able to take in & process other things, like purpose & the bigger picture.
Perhaps it's a defect in evolutionary purpose, but I don't think evolutionary purpose is entirely rational to try and blindly hold on to.
Now that we're capable of seeing past just "survive, reproduce", I think as a society & a species we need to rethink what it means to be alive. What it means to bring life, to end it, and to be alive. We need to look deeper than just the surface level of "but we have to survive" if we want any positive outcome, for our species and others alike. (obviously applying critical thinking skills and empathy there, not just pushing stuff that doesn't have any grounding)
Obviously there's some nuance to it, and I think "mental illness" is a real thing as well, but that it's on a smaller scale. I just don't think being suicidal or even miserable are automatically signs of some sort of fault in the brain. I find it insulting that people refuse to listen to well thought out conclusions & arguments simply because they go against our internal directive of survival & reproduction.
Sorry if I sound full of myself, or don't make much sense, neither of those are my intention (also sorry for the rant)