If it is not the result of mental illness, then yes. In Switzerland, you can go and legally end your life.
If it is voluntary, repeated, and the person of sound mind, I can't see why the government should prevent a terminal patient who is in constant pain from dying with dignity on their own terms.