Xhaka reacted angrily to home fans booing him after he was substituted during Arsenal's 2-2 draw at the Emirates Stadium and the player has since been left out of the squad.
"I feel sorry for him because he (was) the captain and he's going through a really difficult period and really difficult time at Arsenal," Vieira told British media. "I think we have to remind ourselves that he's achieved a lot since he's at Arsenal and he deserves a lot of respect.
Xhaka says he is ready to battle for Arsenal place
"When you're a player and don't perform the way you expect, you get frustrated about yourself. And sometimes you say things or do things you regret."
Arsenal's 2-0 loss at Leicester City last weekend left them sixth in the Premier League and put more pressure on coach Unai Emery, who received backing from the club's hierarchy but has been told to improve results.
Vieira, who won three league titles with Arsenal, has also urged the supporters to get behind their manager.
"I think he has enough experience to get them through this difficult spell," Vieira added.
"We have to get behind him and give him time to change things. I am not sure a change of manager will fix the problems."
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ