Losses to Barcelona and Sevilla - the first time Madrid have suffered successive defeats in the Primera Division since the 2008/09 campaign - over the previous seven days had badly hit their title hopes.
But they returned to winning ways in style on Saturday night thanks to goals from Cristiano Ronaldo, Gareth Bale (two), Daniel Carvajal and substitute Alvaro Morata.
And Ancelotti promised his team would not give up in their remaining fixtures.
"Naturally, this win is important," he said on Real's official website. "Today we reacted well following two losses. We played a great game, with a good attitude on the pitch.
"This serves to prepare well for the next game. In the last two games we made errors at the back. Today we didn't and we used the counter-attack well. The back four were good."
Atletico Madrid and Barca also won on Saturday to maintain the status quo at the top of La Liga, with Real three points adrift of Los Rojiblancos and two behind their Catalan arch rivals.
"We have to carry on," Ancelotti continued. "It's an important part of the season for all of us. We could be better, given we lost twice, but physically we're good.
"Also, we reacted well and we carry on looking forward optimistically. If we win all the games that we have left, at least we win the Champions League and the Copa del Rey. We just have to believe in ourselves and be positive."
Ancelotti stressed his team would be focusing only on themselves during the run-in and would not be distracted by what Atletico and Barca get up to.
"They could affect us a little bit - it's normal," he added. "We must be focused on our game and nothing else.
"Maybe those who didn't play (on Saturday) were listening to the results, but those who were going to play weren't thinking about other sides."