Gareth Bale struck twice to go with goals from Cristiano Ronaldo, Daniel Carvajal and Alvaro Morata in Real's comfortable win, which kept them three points behind La Liga leaders Atletico Madrid.
Ancelotti praised his team for bouncing back from consecutive losses and urged his side to keep their concentration ahead of crucial league, cup and UEFA Champions League matches.
"The team had a good attitude on the pitch and it will serve well in preparation for the next match (Wednesday's Champions League clash against Borussia Dortmund)," the Italian told a news conference.
"My message to the players is to continue as they are. It's a very important time for everyone. It could've been better after recent results but physically we're fine and mentally we are able to rebound.
"If we win the remaining games, we'll win the Champions League and the Copa del Rey. We should only think about ourselves and in the positive."
Atletico and Barca both claimed wins on Saturday to keep Real third, and Ancelotti is eager for those results to have no impact on his side.
Ronaldo played out 90 minutes for Real despite picking up a nasty-looking gash to his left knee.
Ancelotti played down the knock and also defended midfielder Xabi Alonso, who he believes is performing well.
"Cristiano is fine, he has a small gash on his knee. It's nothing serious," Ancelotti said.
"Alonso looks fine to me. We don't need him to be dynamic, but balanced, well-positioned and intelligent. He's very, very smart."
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.