The Citizens had been unbeaten in 22 games in the Premier League, Champions League and the EFL Cup going into the encounter in Ukraine but were stunned by the hosts in the space of six first-half minutes, Sergio Aguero's stoppage-time penalty proving a mere consolation.
With qualification to the last-16 stage of the competition already assured, Guardiola had fielded a much weaker side in preparation for this weekend's Manchester derby but admitted that he was still 'hurt' by the loss.
"It hurts. It is never nice to lose a game," he told reporters. "But we have said many times we cannot win all the time, we are going to lose games. Today was the first.
"We needed to lose a game. It will be good for the club, for all of us and the media. People say things when you win a lot and you can forget that now.
"We saw many good things but we made mistakes and we are going to improve on that. Football is how you recover in the good moments and bad moments to stay stable."
City will go into Sunday's match with Manchester United eight points clear of their city rivals at the top of the Premier League table.