The state’s embattled welfare chief was forced to step down yesterday in the wake of a shocking internal report that found that a staggering 47,000 families receiving taxpayer-funded benefits are unaccounted for — and nearly $30 million in food stamp money went to recipients who were not eligible.

The shocking report, released to the Herald last night, found that the Department of Transitional Assistance has lost track of 47,087 households on welfare — or one out of 10 of the total 478,000 who received DTA mailings.

The welfare department also admitted that it overpaid federal food stamp recipients by a whopping $27.8 million since 2010.

As a result, newly sworn-in Secretary of Health and Human Services John Polanowicz demanded that DTA commissioner Daniel J. Curley resign yesterday.

“These issues have distracted DTA staff from the important work that they do for clients,” Polanowicz said in a statement. “I intend for these steps to clearly indicate that we are accountable for taxpayer resources and seek to protect benefits for those who truly need them.”

Curley’s resignation comes after a series of Herald reports detailing rampant mismanagement in the welfare department, as well as inquiries into whether DTA was paying food-stamp recipients after they were no longer eligible to collect.

The Herald reported early last month that 19,000 voter registration mailings to welfare recipients came back as undeliverable because the state couldn’t confirm their residencies.

That number was based on welfare department estimates. But after staffers hand-counted boxes of returned mail, they discovered the actual number is more than 47,000.

That means thousands of people receiving electronic benefits may have moved out of state or out of the country — or they may have died or gone to prison.

Polanowicz also admitted that the U.S. Department of Agriculture — which funds the food stamp program — notified him last week that the state has overpaid welfare recipients by $27.8 million since 2010.

The state attributed that taxpayer-funded blunder to a lack of staff and resources during the recession, when thousands of new recipients flooded the agency to sign up for food stamps.

The state is currently in negotiations with the USDA to work out a resolution, Polanowicz said.

He also cited an audit from Inspector General Glenn Cunha — which the Herald reported yesterday — revealing that the DTA doled out $25 million, or 3 percent of its budget, in possible overpayments to welfare recipients.

The IG’s report showed that welfare benefits are going to thousands of families that may not be eligible because they are working outside jobs, failed to provide proof of residency or proof of citizenship, or submitted false information about spouses they claimed to be absent, among other disqualifying factors.

Polanowicz defended DTA’s more effective operations but acknowledged they’ve been overshadowed by these glaring cases of taxpayer waste.

“I have also observed in my short tenure as secretary that the Department of Transitional Assistance faces serious challenges that need to be addressed,” he said. “Reports alleging millions of dollars in overpayments, concerning eligibility issues, and significant problems with client lists following a mass voter mailing, have dominated the public discourse.”

Curley, who was named welfare chief in November 2011, did not return a phone message left at his home.