It's really really not about resource allocation, it's about autonomy and choice, and the state's relationship to those things. The thing to appreciate is that the state cannot stand back from this, it is taking a position either way - currently in most countries it actively compels people to live.
The distinction to be drawn between medically-related euthanasia and suicide in other circumstances is basically autonomy and choice. We tend to generally deem suicidal tendencies in healthy people a form of mental illness (particularly for teenagers). This makes it evidence of impaired rationality, and impels the state to try to prevent the potential harm to the individual. The same sorts of paternalistic transfer of decision-making occurs as occurs with such cases as occurs with, say, children - either the state or next of kin gets to make the decisions.
Yet, despite that conceptual argument for stopping non-medical suicides, aside from putting people on death watch, we actually pretty much let people who have psychological burdens kill themselves with impunity. If they're of able body and a degree of shrewdness that means they don't just get locked up and strapped down 'for their own good' then they're pretty much free to kill themselves.
Now maybe it's actually wrong that we prevent people who are healthy but want to die from exercising their full autonomy even to the limited extent that we do. I'm certainly open to the argument that suicide is a perfectly rational response to the human condition and what we call mental illness is usually just a different reaction to the futility and pointlessness of existence. Also, it does seem that if you have a right to life you must have a right to waive it (otherwise it's actually an obligation to life). But even then, there's also the collateral damage a suicide inflicts on loved-ones, so perhaps those third party harms are another justification for separating medical euthanasia and suicide from regular suicide (although this would also be an argument for allowing next of kin to override an assisted suicide decision...).
------
But going back to your question, Elrohir, under the status quo I'd argue you've got it backwards, we're actually not "unfairly favouring" physical pain but the reverse. People who are incapable of doing themselves in autonomously, cannot do so, even though they have what we would, as humans, generally consider a far better case for the rationality of suicide than the random suicide by bridge. Legalising assisted suicide and euthanasia would seem to be redressing this imbalance.
Now, I accept that, in these end-of-life "lots of pain" or "preserve my dignity" or "don't want loved ones to see me suffer" are states of mind which may a result of impaired rationality in a similar way to suicidal tendencies in other situations. But I don't buy that there's enough of an impairment to allow the state to make decisions on the patient's behalf (ie, defaulting to obliging the person to live). Mental illness is altered cognition with a medical basis, not mere emotional pressure or suffering which we all face to some degree.
Finally, as further support to the rationality basis for separating medical suciide from the regular kind, I'd submit the example of the doomed dictator or criminal killing themselves to escape capture and punishment. They, like the teenage girl, are perfectly healthy people, yet most of us can see an element of understandability that is simply lacking in a regular depression-related suicide by an ordinary citizen.
And a further personal example. A few years ago at another forum, a regular poster killed herself. She'd been depressed for as long as anyone knew her, and had recently diagnosed as bipolar and schizophrenic. Her life was suffering, she knew she couldn't get better, that she'd never be happy, that the best she could hope for was drugs, medically-induced oblivion of her personality and an inability to feel anything at all. I find it hard to consider her decision to kill herself irrational or unfounded in objective suffering. So you're right that it's not just physcial suffering which can make suicide seem fairly understandable - but as I say, people who are able-bodied are capable of suicide by thier own hand and the state doesn't really do much to stop them.
It's extremely tricky terrain, but the key lens to see things through is what is the state's role, and I'd argue that if there's even a small amount of rationality there, the state already leaves regular suicide alone (despite what the law may say) and should do likewise with the medically-induced kind, it should enable choice instead of obliging people to live.