His patients called him Dr. Feelgood. But he was really Dr. Death — and he plans on going right back to work as soon as he makes bail.

Ten overdose deaths have been linked to the same millionaire pain management physician — the same doctor who supplied more than 2,500 pain pills to the OxyContin addict who shot up a drug store on Long Island, leaving four dead, authorities said today.

Flushing-based Dr. Stan Xuhui Li dispensed pain meds like a gum ball machine, pocketed hundreds of thousands of dollars in cash fees and left a trail of bodies, narcotics prosecutors said as the alleged killer pleaded not guilty to charges that he illegally prescribed pain pills and slow-release patches to a Queens man who overdosed last November at age 40.

“This is the tip of the iceberg,” said narcotics prosecutor Charlotte Fishman of that OD. By the time he died, tragic Michael Cornetta had been admitted to emergency rooms for two prior overdoses and was literally chewing on slow-release fentanyl pain patches provided by Li.

Li plans to continue working as soon as he can post the $500,000 bail bond ordered in Manhattan Supreme Court this morning, despite an ongoing investigation by medical misconduct officials — and despite the nine more fatally OD’d patients authorities linked to him.

“He won’t voluntarily shut down,” Li’s lawyer, Aaron Wallenstein, said after court. “He will be back in business. He doesn’t want to put is other patients at risk.”

Li sold thousands of painkiller pills to David Laffner, whose bloody gunpoint stickup of a Medford pharmacy left four dead, law enforcement source said. Both Laffner and his addict wife were patients, though Li’s lawyer insists that the Laffners and the Queens man had been “discharged.”

In addition to the death he is awaiting arraignment on, the Hamilton Township, NJ-based Li has been linked to nine other overdose deaths from the past three years, citywide narcotics prosecutor Bridget Brennan said after her office busted him this weekend following a year-long investigation.

Li, a full-time anesthesiologist at Dr. Robert Woods Johnson Medical Center in Hamilton Township –making more than $400,000 a year — showed up on investigators’ radar after patients’ family members started complaining that he was overdosing their loved ones.

Patients would line up outside of Li’s office — Medical Pain Management, at 132-59 41st St. Road — even before office hours and on weekends — often re-selling their pills and patches right outside the office afterward. As many as 120 patients a day were “treated,” authorities said.

Investigators are probing the cash fees Li would charge his patients, along with payments he obtained from Medicare and Medicaid, officials said.

Li continued to prescribe fentanyl patches, oxycodone and alprazolam to the Queens man, Michael Cornetta — at full strength — even after Cornetta overdosed and sought substance abuse treatment, officials said.

Li is expected to plead not guilty to 15 counts of criminal sale of a prescription for a controlled substance and five counts of reckless endangerment. He faces a maximum of five and a half years for each of the 15 RX sales counts.

He is being prosecuted under Brennan’s newly created Prescription Drug Investigation Unit, which officials said was formed to combat the proliferation of RX narcotics on the black market.

The Health Department, NYPD, New York Drug Enforcement Task Force and Office of National Drug Control Policy joined in the investigation.