We're stuck in a catch 22 here. If someone is suffering from an untreatable mental illness, we will define them as not responsible enough to be helped in taking their own life. If they are responsible enough that we think their desire to die is not because of an untreatable mental illness, then they aren't suffering enough to be helped in taking their own life.
It's hardly surprising when in many ways our categorisation of mental illness despite the work done over the last fifty years, is really not much more than at the level of weird but not dangerous, sad but not bad, bit dodgy, and nutjob.
Putting anything that vague into legislation is a nightmare, never mind that there isn't clear agreement on how people should be treated even when they are suffering incredible physical pain, and we determine that they are of sound mind and want to be able to be helped to die when they are unable to do so themselves. I suspect in part because some people even then see it as indicative of not being of sound mind.
Added to that the fear that some people might be manipulated into a painless societally acceptable suicide, if there is no criteria to be used other than they appear to want to, is a legitimate one, and one hard to guard against.