The husband of a teacher killed in this week's mass shooting at a Texas primary school has died from a heart attack, family members have said.

Joe Garcia was yesterday preparing for the funeral of Irma Garcia, his high school sweetheart and wife of 24 years, when he collapsed and died, the newspaper reported.

The two leave behind four children, according to the report.

Irma Garcia, 46, was one of two teachers killed at Robb Elementary School in Uvalde, Texas, along with 19 children. Relatives briefed by authorities said Irma Garcia and her colleague Eva Mireles died trying to protect their students.

NBC News also reported on the death of Joe Garcia citing son Christian Garcia and a nephew, John Martinez.

"EXTREMELY heartbreaking and come with deep sorrow to say that my Tia Irma's husband Joe Garcia has passed away due to grief, i (sic) truly am at a loss for words for how we are all feeling," wrote Mr Martinez on his Twitter account, using the Spanish word for "aunt" and requesting prayers for the family.

"God have mercy on us, this isn't easy."

Joe Garcia died after returning home from delivering flowers to a memorial for Irma Garcia, Mr Martinez told NBC.