ALBANY, N.Y. — The startling disclosure came two minutes into a State Capitol news conference.

State Senator Peter Harckham, a first-term Democratic lawmaker, announced his support for legalizing recreational marijuana, but he first acknowledged his own struggles with addiction.

“As someone in recovery myself for many years, I look at it from that lens,” Mr. Harckham said last month.

“As someone in recovery, my job in life is not to outlaw every mood-altering chemical on the planet,” he said. “My job in life is to learn how to navigate that environment in a sober manner and help others do the same.”

He introduced five of the 17 bills the State Senate passed last Tuesday to fight drug abuse and the scourge of overdose deaths. The raft of bills is aimed at plugging a series of holes in the way opioids are prescribed, health providers are trained and naloxone — a drug that can reverse overdoses — is distributed.