Los Blancos qualified for the knockout round of the competition with two games to spare courtesy of their 1-1 draw with the Ukrainian giants.
Oleksandr Zubkov sent Shakhtar ahead in the 46th minute of the contest, but Real Madrid secured a point in the final exchanges courtesy of a header from Antonio Rudiger.
Ancelotti has claimed that the reigning European champions "played very badly" in the Group F contest but showed impressive character to navigate their way into the round of 16.
"We have reached this point in the season in good shape. We are in the last 16 of the Champions League," Ancelotti told reporters following the draw with Shakhtar.
"We have delivered and shown that we never give up. We played very badly and this can happen in football, but the important thing is not to give up when things don't work out. We've tried until the end.
"We played poorly because sometimes it happens. The game was controlled in the first half and we had planned to play more inside than outside. When we conceded the goal, everything got complicated, we lost balance and suffered on the counter-attack.
"The positive thing is that we never give up and beating Madrid is not easy. It is positive to go to the round of 16 because only those who go through to the round of 16 can win the Champions League.
"We have changed the way we press with respect to the first half and they have found a space alongside [Federico] Valverde and Rodrygo. It was annoying to fit in as soon as the second half started because the game got much more complicated."
Ancelotti shuffled his pack on Wednesday evening, with Lucas Vazquez, Rudiger, Nacho and Eden Hazard among those handed starts.
However, the Italian has said that the changes were not made with one eye on El Clasico this weekend, rather the fact that the team faced a long trip after taking on Getafe in La Liga on Saturday.
"When you play on Wednesday and then on Sunday you have all the time to recover well. I made changes to avoid problems. The problem was playing today because we played on Saturday night and we had a long trip," said Ancelotti after the match.
"That was the reason for the rotations and not to think about the Clasico. Maybe whoever doesn't play today won't play in the Clasico either."
Real Madrid are currently second in La Liga, level on points with leaders Barcelona (22), ahead of Sunday's clash between the two sides at Bernabeu.