Pellegrini voiced his frustration with his players after they needed to recover from 2-0 down against the Championship side in the FA Cup fourth-round tie at the Etihad Stadium.
City eventually won comfortably 4-2 after a Sergio Aguero hat-trick, but Pellegrini said after the game their defending was a "disaster" and he would have liked to substitute all 11 players.
Pellegrini, speaking at a press conference to preview the midweek Barclays Premier League trip to Tottenham, said: "It was a good lesson - to pay attention in the right moments.
"In football the difference between winning and losing is very slight.
"I can't say what they saw of me, but I think we made the correct arrangements during half-time.
"I think the reaction was very important, as was the way we finished the game."
City, who remain in contention in four competitions, now turn their attention back to the league and their bid for a second title in three years.
The trip to Spurs, a side pushing for Champions League qualification, marks the start of a tough spell that could prove critical in the season's final reckoning.
In February, City host Chelsea in the league and FA Cup and then take on Barcelona at home in the Champions League. The Capital One Cup final against Sunderland follows on March 2.
Pellegrini said: "In the way the season continues every match will be more important.
"We have a month of February where we have very important games for the Premier League, to try to continue on the top of the table with Arsenal and Chelsea.
"After we have knockout games against Chelsea in the FA Cup and the first leg against Barcelona, very difficult games.
"From now until the end of the season we must continue in our best form."
City thrashed Spurs 6-0 when the sides met in Manchester in November, but the Londoners have found form under new manager Tim Sherwood and have won five of their last seven.
Pellegrini said: "The results say that they have improved a lot.
"They have won the last four (Premier League) games. I saw the last two games they played and they are playing very well."
Pellegrini believes Spurs are still in contention for the title and has not ruled out a push by champions Manchester United, who are now outsiders but have bolstered their ranks with record signing Juan Mata.
Pellegrini, speaking ahead of United's game against Cardiff, said: "I don't think we are just three teams involved for the title.
"Tottenham, Liverpool, Everton and Manchester United continue with chances.
"In football you never know. We have 48 points more to play for and if you add 48 to 37 (United's total), it is 85, an important amount of points.
"I think an important player can change a team in every game.
"I am not just talking about Mata and Man United, but Man United have bought a very good player."
The trip to White Hart Lane brings City up against their former player Emmanuel Adebayor, whose game has been revived under Sherwood with three goals this month.
Adebayor had been frozen out by former manager Andre Villas-Boas and left City after disagreements with Pellegrini's predecessor Roberto Mancini.
Pellegrini said: "It is always important to have a striker Adebayor in a good moment so I am sure we are going to have a very tough game against them.
"It is important I know that our team will try to go there and win the game, not the history with him."