The 29-year-old Spanish defender, who Arsenal loaned to Monza this summer, underwent a procedure at Milan's Niguarda hospital after being wounded in the back while shopping with his wife and son on Thursday.
Serie A team Monza said he would remain in hospital for two to three days.
"After the difficult time we had yesterday, my family and I would like to say that thankfully we are doing well and we would like to thank everyone for the kind messages of support that we have received," Mari wrote on social media with a picture of himself in a hospital bed.
Monza chief executive Adriano Galliani said Mari would not return to training for around two months and that the club had asked that Monday's match with Bologna be postponed as "the team is in shock".
"Everyone in the team cried last night, they all wanted to visit him but we couldn't," Galliani told reporters outside the hospital.
Mari was one of several people attacked in a Carrefour supermarket in Assago, on the outskirts of Milan in northern Italy, by a man apparently suffering from psychological problems who killed one man after grabbing a knife from a shelf.
Monza said in a tweet they were "united in grief" with the family of the supermarket's employee whose life was taken.
Four other people were hurt by a 46-year-old Italian who was arrested by police, reportedly after being disarmed by former Napoli and Inter Milan defender Massimo Taranto.
"We are thinking of the family and friends of the victim to whom we send our deepest condolences," added Mari.
Ahead of Arsenal's 2-0 defeat at PSV Eindhoven on Thursday the Premier League team's coach Mikel Arteta said: "We will be in touch with him, hopefully he is OK."