Herrera was given his marching orders in only the sixth minute of the UEFA Champions League Group G tie after being shown two yellow cards in quick succession.
His first for a reckless challenge on former Porto striker Hulk was immediately followed by a foolish second for encroachment on the resulting free-kick.
And Zenit eventually made them pay in the 86th minute when Aleksandr Kerzhakov headed home a superb Hulk cross.
"The red card just after six minutes was decisive and playing with 10 men against a team like Zenit conditions any strategy," said Fonseca.
"I'm not happy with the result but we showed a lot of solidarity between our players and we improved in many aspects even with 10 men.
"I'm proud of what the team did and we even created chances to score.
"It gives us optimism for the future. Things are more difficult now but not impossible.
"We are still in contention for next stage and we believe we can win in any stadium. If Zenit won here then we can also win in Russia.
The defeat sees Porto drop to third in the group, with Zenit up to second.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.