I apologize in advance for the length and rambling nature of this post, but this is a topic that has garnered a bit of curiosity with me. I've heard it said that the topics that make one uncomfortable are the ones worth discussing because they challenge a person and the assumptions they might have. I'm by no means an expert or even well versed on the subject. The things I say here are largely formulated from conjecture, thus might be completely off the mark. If that is the case, learning more about the actual nature of the subject in discussion would certainly have my interest.
With that being said, the first thing I like to do when approaching any topic of serious discussion is getting a clear definition of the terms we use. The term "mental Illness" is center stage of course. My assumption of the term, from a completely lay-mans view is that mental illness is believed to be caused by either a chemical imbalance or sometimes a physical damage (e.g. a tumor or a neurological impairment) with the brain.
Assuming that definition is an agreeable one, the next term worth looking at is depression. It's a term that varies widely in definitions. In medical circles, it is almost always defined as a mental defect. In common parlance, however, depression can merely be an emotional state of induced by events surrounding a person. So we must take care not to equivocate between the two. The question that first needs to be asked is "Is depression by definition a mental illness?" From a lay-man's perspective, I have no reason to accede to that definition. My conjecture is that depression, either induced by events or by a medical ailment of the brain, are both frequent causes of suicide. So is depression a mental illness? Right now, I would not agree that it is. While the brain is undoubtedly a complex organ, and the chance that something may "go wrong" somewhere with it seem plausible, I'd put forth that the chances that events surrounding a person that can yield similar results are just as likely, if not more so.
For example, I would not label the parent that loses a child and subsequently commits suicide as mentally ill. I would challenge anyone who tried to make the claim that the parent had "something wrong" with their brain. Similarly a rape victim, or an abused child, or even the soldier suffering from post traumatic stress due to their experiences in war. Do we call them mentally ill when they choose or attempt to take their life? Let's expand on the soldier, who witnesses or even takes part in an action that results in death (which is all too likely in war). Such an event is clearly traumatic. A philosophical conundrum has arisen where a normal person has sacrificed the rational value of non-aggression, compelled by the (often) sociopaths in charge who do not maintain the same rational values that a normal person does, yet they compel the soldier through years of cultural indoctrination (or more accurately, wields the culture as a tool to compel) to sacrifice that which is clearly virtuous (non-aggression) for that which must be indoctrinated (statism/patriotism). The soldier who is naturally abhorred by what he's witnessed or taken part in is further told and constantly reinforced by his culture and surrounding people that those abhorrent actions were actually virtuous, despite being counter to rational non-aggression. Whether you agree or disagree that a soldier's actions of killing is virtuous, the soldier himself who philosophically concludes that it is not, must come to grips with a first-hand traumatic event... one that haunts him, and logically so.
Trauma obviously induces pain. The lay-man often calls this depression. My understanding is that trauma is not regarded as a physical medical condition, but an outside force acting upon the individual, and not the individuals themselves. Arising from people, events, or any other outside influence, the pain is still as real as anything medical. When one is in "pain", it is not atypical for someone to attempt to ease said pain. I believe that this is why many people turn to drugs, be they illicit or pharmaceutical. Allowing trauma to go unprocessed or unacknowledged means that pain will likely continue to persist. If the pain is of sufficient quantity, an "out" via suicide might seem like just another way to ease the pain.
The pharmaceutical lobby who pushes drugs to ease the pain of trauma, seems to argue that it is a treatment for people who are suicidal. I find that this is analogous to a person who takes Novocaine because their teeth hurt. The underlying problem (e.g. a dental cavity) goes unacknowledged and the symptom (pain) is the only thing being treated. The pharmaceutical lobby certainly profits from a patient who must continually cover up the symptoms of pain (not unlike any street drug dealer). I like to ask the age-old question of "Cui bono?" (who benefits?") whenever I see studies or arguments that claim that for-sale solutions are the go-to default solution for a problem. The motives of people making these claims need to be examined before the claims should be accepted. The argument I'd make is that treating what we call depression with chemicals and seeing results that might result in fewer suicides does not mean that one can conclude that the root cause was of a chemical nature. Unfortunately, I think too many people do jump to this conclusion (and assume the problem was mental illness).
Too many people have an aversion to introspection and self-knowledge. Rarely do they challenge their assumptions and too often do they treat them as axiomatic. The stigma behind suicide might be one such assumption. Generally suicide is treated as a tragic event. The loss of a family member who has taken their own life is sure to be grievous. That's potentially one of the ironies to suicide. Suicides caused by traumatic events are themselves inflicting trauma upon the people who surround the one committing suicide. In this sense, suicide might even be purposefully used to inflict pain as a big "Screw you" to people close to them. Short of obvious true mental illness, fundamentally the act of suicide is a message that a person no longer wishes to share existence with the people and environment that surround them. If the cause of trauma was related to or caused by the people who surround the suicide victim, this "message" has a much greater impact. Those who are left behind are obviously searching for answers, but because most people are not willing to undertake the philosophical rigors of introspection and self-knowledge, they want the easy way out. This is where I believe they accept what they want to hear. The classic example (seemingly) is that "it must have been an undiagnosed mental illness". This shifts the burden of blame off the people and environment that potentially inflicted trauma that led to the suicide, and puts it entirely on the suicide victim. The convenient solution, I'd argue, is not always the correct one. Religion sometimes capitalized on this by deeming suicide a "sin", making any suicide victim "sinful" in the eyes of the religion. Likewise the drug pushers capitalize on the stigma of suicide, assuming the fault is the victims (medical condition).
Those who choose to blame the victim make the assumption that suicide cannot be a rational act, and conclude that since they were not operating rationally, it must have been due to a mental defect. So we should examine this: can suicide ever be rational? The obstacle that anyone committing suicide must overcome is what is called the "self-preservation instinct". Biologically, a creature without the self-preservation instinct typically did not get far in existence. An animal that died prematurely "lost" the game of passing on one's genes and replicating their biology into the future. So it's reasonable to expect a creature as advanced as human beings to have this aspect of biology with them. The thing about instinct is that it's not always "logical". The instinct to reproduce, for example, is not generally beneficial to the person who is reproducing. It is beneficial to the person's biology in the sense that it continues to exist into the future beyond the one individual, but for the individual person themselves (especially for the woman who must risk child birth) reproduction and the subsequent loss of resources spent of raising descendants is generally not logical in the sense of self-interest (note: personal preferences often override logic). Suicide is quite the antithesis of having children, in that it is the individual and its biology self-terminating. What situations could be such that it is seemingly preferable to not exist... as opposed to continued existence, for if it is preferable to not exist, suicide might be a rational (not necessarily logical) course of action. This situation has long been observed philosophically. One of the most well-known takes on it is Shakespeare's Hamlet soliloquy of "To be or Not to be?". Hamlet, in the play, is questioning whether he should prefer to die now and end his troubles or to continue to suffer them by living. What stops him happens to be a religious motif of suffering after death (especially when you've "sinned" by committing suicide). Similarly, as you've pointed out, people generally do not prefer to die painfully. Suicide, if an attempt to ease the pain of trauma (or mental illness), would make little sense if it were seemingly more painful than current circumstances. As an aside... in the vein of rational suicide, part of my philosophical curiosity on the subject was piqued by this site:
http://www.exitmundi.nl/suicide.htm where they took the situation to an extreme... what if we lived forever? Would we ever voluntarily choose to end our lives out of pure reason?
Like I said in the beginning, I have no real expertise on the subject, so the numbers and data might be around that definitively prove that the great majority of suicides are due to a defect in the brain (and the abandonment of reason). I'd just like to submit my skepticism to such claims based on my above writings. If nothing else, think of all the people who commit suicide, and then think of how many of them would still do it if their environment had changed to say... being on a tropical island full of beautiful naked women willing and eager to please them... and rich.