(National Institute on Drug Abuse) When a person dies due to a drug overdose the medical examiner or coroner records on the death certificate if the overdose was intentional – purposely self-inflicted (as in cases of suicide) – or unintentional (accidental).
Unintentional drug poisoning deaths can happen when a drug or drugs are taken on purpose (or mixed together). They can also happen when a drug or drugs are accidently taken or given to a person in the course of a medical procedure. Total overdose death numbers also include cases where drugs are given to a person in a criminal act (a homicide, if a death occurs.) With most drugs, there are more accidental deaths than suicides or homicides.
Some overdoses happen when people leave drug treatment. During treatment, a person goes through a detoxification (“detox”) process---getting the drug out of the body. If a person has gone through detox, and then takes the same amount of drugs they took before, they can overdose because the body is no longer used to the same dose. Read more about youth drug overdoses on NIDA's site.
Source: National Institute on Drug Abuse; National Institutes of Health; U.S. Department of Health and Human Services.