This, according to Reuters was how he died:
Ritter collapsed on Thursday evening while filming "8 Simple Rules for Dating My Teenage Daughter," the ABC television comedy which had reinvigorated his career and was a centerpiece of the network's upcoming fall season.
He was taken to Providence St. Joseph hospital in Burbank, California, across from the studio where he had been working.
There he died from a "dissection of the aorta," which results from an unrecognized flaw in a main artery from the heart, his publicists, Wolf-Kasteler & Associates Public Relations, said.