An 8-year-old student died Thursday in an accident at the Elm Street School in Gardner, authorities said. Colby O’Brien was attending an afterschool program when a large television and cart fell on him at about 4 p.m., Worcester District Attorney Joseph D. Early Jr.’s office said. The boy was taken to Henry Heywood Hospital and was pronounced dead, said Early’s office. The school will be open on Friday, and grief counselors will be available, Mayor Mark Hawke said. The accident is being investigated by State Police detectives.