I think Ancelotti understand the importance of timing and have seen that it is better to leave when he is still seen as a hero rather than when things have gone badly. He has made Real Madrid win trophy for most of the season and going a season without trophy might make him lose some of those admiration he enjoyed. This is the reason he might be considering leaving to ensure he do not spoil his reputation. I completely understand him and I will support whatever decision he takes.
Ancelloti has won almost every major trophy during his time as a coach and maybe a season without a trophy is not a big deal for his reputation. La Liga still has a chance that they can chase as long as they can make a much better performance because when they face El Clasico they can close the gap on Barcelona even though they will still be one point behind Barcelona.
Barcelona will be more focused on preparing for the semi-finals in the Champions League so the coach will definitely make some rotations and if the results are beyond expectations because they will draw in the next match then this scenario can be used well by Real Madrid so they can chase points in the crucial match when the two meet.