The assailant in Tuesday night's attack was identified as Arthur DaRosa, of Taunton. Officials said they are searching for a motive.
DaRosa's sister and father said he had claimed that the devil was trying to make him do things, the Boston Herald reported.
Kerri Devries said her younger brother had battled depression for years and was hospitalized as recently as Monday.
"He told them how depressed he was and how he didn't want to live anymore and they still let him leave," Devries told the Herald.
PHOTOS: Deadly stabbings in Massachusetts
DaRosa's father said he visited his son in the hospital Monday night and was surprised when he showed up at the family's home Tuesday morning.
"He needed help, so we tried very much to help," the elder Arthur DaRosa told the newspaper. "Why did they release him this morning? That's the question. He came over to get his keys to go to work. He was good. Normal. No attitude. He was calm."
The elder DaRosa said the last he heard was that his son went to his own daughter's soccer game Tuesday afternoon.
Authorities said the rampage began when the 28-year-old DaRosa crashed a car at around 7 p.m. outside of a house in the city, about 40 miles south of Boston. He walked inside the home and stabbed two women. An 80-year-old was taken to a hospital, where she later died. The other woman was being treated for life-threatening injuries.
DaRosa then drove to the Silver City Galleria mall, where he crashed into the front of a Macy's department store, authorities said.
Bristol County District Attorney Thomas M. Quinn III said when DaRosa got out of the vehicle, he assaulted a number of people inside Macy's before making his way to Bertucci's restaurant.
Once inside the restaurant, he stabbed two people, including George Heath, 56, a high school teacher who later died. An off-duty sheriff's deputy intervened and shot DaRosa once, Quinn said. DaRosa was taken to a hospital, where he was pronounced dead.
Heath was a visual design teacher at Greater New Bedford Regional Vocational Technical School, said James O'Brien, the school's superintendent-director.
"He inspired kids to understand their true creativity," O'Brien said Wednesday. "He is certainly going to be missed."
Heath had worked at the school about four years.
Witnesses described the scene at the mall as chaotic.
Alex Mace and Jenn Breault told WBZ-TV that they had just arrived when they spotted a girl hiding in the bushes outside of Bertucci's.
"You could just tell she was scared for her life," Mace told the station. "She was kind of hiding behind a bush with her head down."
The girl told the couple what she had just seen.
"She saw a guy walk in and he grabbed a chair to hurt one of the waitresses and she saw him stab the waitress," Breault said.
Authorities did not immediately identify the other victims or what connections they may have had, if any, to the suspect.