EMS Lt. Timothy Dluhos, 34 — known as the “Bad Lieutenant” on Twitter — resigned from the FDNY April 16, less than a month after he sobbed when The Post confronted him about his racist posts.

Dluhos — who called Mayor Bloomberg “King Heeb,” made racist comments about African-Americans and Asians, and posted a picture of an overweight patient — avoided potential disciplinary charges that could have led to his firing when his 30-day suspension ended April 24.

“He had an option to resign, and that’s what he chose to do,” FDNY spokesman Jim Long told The Post.

He is the second disgraced EMT to resign since The Post exposed the racist rants of Commissioner Salvatore Cassano’s son. Joe Cassano, a rookie EMT, resigned in March.

The move likely allows Dluhos to collect a partial pension in 13 years, but far less than he would have made if he completed 25 years of service.

Dluhos made $93,561 in 2011, payroll records show.

“He displayed bad judgment,” said First Amendment attorney Ron Kuby, who said he spoke with Dluhos. “It’s incredibly sad that stupid tweets could erase over a decade of service.”

While working for the FDNY’s EMS Station 57 in Bedford-Stuyvesant, Brooklyn, Dluhos moonlighted for Richmond County Ambulance on Staten Island part-time.

Since his suspension, Dluhos has worked more hours for the service, sources said. A supervisor there would not say whether Dluhos now works for the company full-time.

“We do everything that’s in the best interests of our patients,” said a supervisor who identified himself as Ben.