By analysing someone's behaviour during a training period, a program called BusyBody can learn to tell what someone is doing and whether to interrupt him.
The panacea for a broken heart is a busy mind and a tired body; so throw yourself into work even though you don't really feel like working, and focus all your energy into your professional life.