Players in general aren't good at planning their retirements.
Of course they're not, that's because it's impossible to know beyond all doubt when the best time is. Ideally you'd want to retire without anything left in the tank (ie, you've performed well for as long as you can do) and without having played so much as 1 game with nothing left in the tank.
However, there is no way (and I don't mean it's almost impossible, I mean it's completely impossible) to know when this is. You've 2 choices: you can retire before risking going past this point (this is the option I'd take every time and I always prefer to see players I like taking it); or you can keep playing and playing and wait and see when the point arrives, and either pack it in or wait to be nudged when you've found it's arrived.
A batsman who plays 7 Tests at the end of his career and averages 23 is no use to anyone - himself or the team. It'd have been best for both himself and the team if he'd not played those games. However, there's absolutely no surefire way to guard against this happening - apart from retiring before it does and risking losing-out on 15 games where you might've averaged 43 had you played them.
As regards Hayden, I'd prefer to see him go on for as long as possible doing as poorly as possible, because I don't consider he's all that good and the lower his career average at the end, the better to my mind. Every innings Hayden plays I always hope he's out as cheaply as possible.
Right now, incidentally, there's zero case for him to be dropped and I'd not say there would be until the end of the SA series (home leg) at the earliest. And it's been thought several times before now that Hayden's run-scoring has stopped, but as long as there are flat pitches and a non-swinging ball, I personally would
never want to bet on it having stopped for good.