A much-changed City side lost 2-1 in Kharkiv, their first defeat of the season in all competitions, with Sergio Aguero scoring from the penalty spot in stoppage time after Bernard and Ismaily had netted for the Ukrainian side.
It was a crucial win for Shakhtar as it confirmed their place in Monday’s Champions League last-16 draw, while Napoli finished third in the group and will be playing in the Europa League in the new year.
Guardiola said afterwards: “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.
“It is never nice to lose a game. It hurts. We played to win until the end. Now it’s about recovery and preparing for the next game.
“We lose a game despite our professionalism. We have said many times we cannot win all the time, we are going to lose games.
“Now we have to recover, it is another competition, the Premier League. We had done the job one month ago.”