The book HOT TODDY by Andy Edmonds said Thelma Todd was taking diet pills that contained amphetemines. But diet pills containing amphetemines seem to have come into use after the second World War. Something that criticism of the book seems to have somehow missed, even though some of the same people found lots of other mistakes, some of which aren't even in there.
However, some of the diet pills that were in common use in the 1920's contained thyroid horomone, which could also cause problems, including heart trouble. Thelma Todd suffered from some sort of heart trouble, as did her replacement at the Roach studio, Lyda Roberti.
The problem of extreme dieting is still with us today. There's a whole industry based on it, so the people involved in that industry have an interest in keeping the thing going.
Jean Morgan ( girl in the pictures said to be a graduate of Paramount's acting school ):
Thelma Todd Dieting Though She Disliked It ( Pittsburgh Press Article ):