There are a lot of things you can do to let them know you’re there for them, and often it doesn’t involve having to say the right thing, or have the right answer. I would get them both out of the house, and focus their attention on something they enjoy doing. They definitely need to reconnect with what makes them happy outside of their relationships. They also need to keep some perspective, which you can help provide. The end of the world is not coming because the relationship is over, although sometimes it can feel that way.
I’d also focus less on thinking of the right thing to say, but rather, just show them that you’re listening to them when they want to talk about it. Sometimes people just want to talk through their feelings or get validation that their relationship meant something.
The other thing you can do is help the person feel good about themselves right now. Breakups do a bang-up on the ego, and if your friends are female, now is a great time to take them out for some fun girly, beauty stuff – like a spa afternoon. It can really help them if you just reinforce all of the things that make them special and lovable, which ultimately leads to faster healing.