Lee Bowyer's first goal in nearly 12 months doomed Chelsea to successive league defeats for the first time in four and a half years.
But a defiant Ancelotti was full of praise for his team's performance against Birmingham.
The Italian said: "I've already said to the players 'don't lose confidence because you played good football.' The result is frustrating but they deserved to win.
"The team didn't play well against Sunderland and this result is not good but we didn't deserve to lose.
"We didn't win because we were unlucky and because Ben Foster (Birmingham goalkeeper) played a good game.
"We have to take confidence from the way we played. It is just the result that was disappointing."
Ancelotti added: "It is a strange Premier League this season. There are a lot of opportunities for teams to close the gap at the top. We are losing opportunities but so are other teams.
"It is a more difficult competition this season because more teams believe in themselves.
"A month ago I said when we were doing well that there would be difficult moments ahead. This is one of them.
"But if we keep playing like that then we will win games."