Ex-baseball star Dwight 'Doc' Gooden uncorked a verbal beanball at Michael Lohan -- calling him a rehab nightmare, and the root of Lindsay Lohan's problems.
Gooden's not the first to say that ... but he does have firsthand experience with Lindsay's dad -- they did a stint on "Celebrity Rehab" together back in 2011.
Doc, who's as famous for baseball glory as his battles with drug addiction, told Jim Rome ... "He was definitely a head case. I can kinda understand why Lindsay has the problems she has."
Even though Doc says Michael was the most screwed up of his 'Rehab' castmates ... you gotta check out the clip to see which one almost made him quit the show.
The full interview airs Wednesday night on Showtime.