Dick Clark -- famed TV producer and "New Year's Rockin' Eve" host -- died from a massive heart attack this morning ... TMZ has learned.

Clark's rep tells TMZ, the TV icon had been in St. John's hospital in L.A. after undergoing an outpatient procedure last night. Clark suffered the "massive" heart attack following the procedure. Attempts to resuscitate him were unsuccessful.

Clark was 82