I think there is another option that is better than either. Heroin is unfairly maligned as a drug – the majority of the harms of heroin addiction are due to its illegality, not due to the drug itself.

Suppose the government sold pharmaceutical quality heroin to the general public. It could open premises where heroin was sold, for on-premises consumption only. The premises would have staff who were trained in safe administration of injections, resuscitation, administration of naltrexone, sharps management, etc. The government could operate these services on a non-profit basis, so the price of the heroin was the minimum required to pay for the drug itself, and the premises/staff/equipment/security/utilities/administration/etc. It could prohibit entry of minors, promote counselling and withdrawal services, etc.

What would be the likely outcome? Well, the black market would shrink dramatically – most addicts and long-term users would migrate to the government-provided service, since it would be cheaper and safer. Faced with the sudden competition, black market operators would likely shift to other lines of business (other drugs, or non-drug illegal businesses such as people trafficking or extortion). The number of deaths from heroin overdose would dramatically fall, since most users would be using heroin at these supervised premises. Pharmaceutical quality heroin would enable precise control over dosage which would eliminate many accidental overdoses; any overdoses remaining would receive prompt medical attention. With prompt medical attention, the odds of surviving a heroin overdose are actually very good. And, unlike illegal operators, it seems unlikely that a government-run service would try to push the substance on the public (and if that ever did happen, the solution would be to remove and punish the staff responsible for that, not abolish the service entirely.)

Long-term heroin addiction, if the substance is legally available at a low cost, pharmaceutical quality, and under medical supervision, is a relatively benign condition from a medical viewpoint. Sure, it does have some negative psychological consequences – such as dulling of thought and motivation and emotions – and it would be best for the addicts to (if they can) gradually wean themselves off it to overcome those negative psychological consequences. But, to be honest, in that respect it is actually not hugely different from many psychotropic drugs (such as antipsychotics and antidepressants) prescribed long-term to a significant percentage of the population. It is far more benign than alcohol, which is a far harsher substance on the body, with potential consequences as cirrhosis of the liver. Most of the negative long-term health consequences of heroin are due to its illegality – for example, many heroin addicts end up with cirrhosis of the liver much like many alcoholics do, but via a very different mechanism. Alcohol directly causes liver disease, heroin is a very benign substance as far as the liver is concerned. [0] Rather, heroin addicts end up with viral hepatitis from sharing needles, and then the hepatitis causes the cirrhosis. If heroin were legalised (in the way I've described), sharing needles would be eliminated, and then heroin addicts would be no more likely to have liver disease than the general population.

I can't see how one can justify the government killing people in cold blood in order to (allegedly) save lives, when there is something else the government could do which would likely save just as many (or even more) lives without killing anyone at all. Ultimately, since the majority of drugs deaths are caused, not by the inherent nature of the drug, but rather by the consequences of its (near-)total illegality, we should really blame for those deaths, not the drug traffickers, but rather governments and legislators, upon whose misguided policies drug traffickers rely for the existence of their businesses.

[0] https://www.ncbi.nlm.nih.gov/books/NBK548690/