It must be as it's basically killing. It's a mercy kill but a kill nonetheless.
Accepting the fact that euthanasia is a sin was hard for me at one point as someone repenting recently as I always liked the idea that if life got too hard, I could always just quit. Now, I just have to hope that I never find myself in a scenario where quitting is preferable (or that if I do, God will give me the strength to bear it).