As soon as you can - but with sensitivity.
Not just before a big presentation / important meeting / on their birthday / when they've just booked 2 weeks of their precious annual leave expecting to be spending time with you!
And if they are a school teacher - dump them on a Friday or at the start of a school holiday so they have 2 days to master their emotions before facing the hordes on a Monday - the hordes are exceptionally good at detecting when the teacher is emotionally vulnerable and go in for the kill (ask me how I know

)