NEW YORK—The state of New York and two large counties agreed Thursday to a $50 million deal to end their lawsuits with drugmaker Endo International, in the latest of a progression of settlements of government claims over the opioid addiction and overdose crisis. Under the deal announced Thursday night, the Dublin-based drugmaker and its subsidiary Par are to pay $22.3 million to the state attorney general’s office and $13.85 million to both Suffolk and Nassau counties. Endo, which also settled claims recently with a group of local and county governments in Tennessee, admits no wrongdoing. “This agreement ensures funding will be made available for critical abatement programs in a more expedited fashion,” Jayne Conroy, the lead lawyer for Suffolk County and co-lead counsel in a series of lawsuits across the country over opioids. Conroy said a trial, which has been going on for about two months in New York, will …