"You're such a great person, he shouldn't have left you".
How often have you heard those words uttered as comfort after a break-up? As well intentioned as the statement is, it can be unknowingly hurtful. Instead of focusing the person's mind on the issues that contributed to the failed relationship, it focuses their attention inward.
Despite the well meaning attempt at reassurance, the individual will inevitably internalise the very opposite of what was said. This will result in thoughts such as "I'm sure there is something wrong with me", or "Oh no, I never thought about that! It must have been something I did". Once they've started down that path, the only cure is lots of ice cream and chocolate. And yes getting dumped hurts for guys too, and their cure is often more 'spiritual' - like a walk with Johnnie.
Instead of offering cliche statements of consolation, a listening ear may help you to be more supportive. If you listen carefully, you may discover whether or not the person's distraught frame of mind is really just shock. Someone who wanted out of a relationship will still be hurt when it ends. Or perhaps you may realise that they are well aware of why the relationship ended.
Relationships rarely fail due to the actions of a single party. Helping a friend to learn from the failure is more beneficial that spending weeks sulking. A few days are usually enough for the dairy foods and alcohol to palliate the pain. After that, it's time to move on and heal.