Right, but that's two different things. Drugs (morphine for example) which are aimed at treating pain, can be dosed at a level which manages the pain and also depresses respiratory efficiency: this is a legitimate therapeutic trade-off, an acceptable side-effect (double effect)for a terminal patient in pain. It is not a deliberate attempt to kill the patient.
If it were, it would be murder.