that's a hard one I would take them out to get there head off of it then slowly try to talk about it with them because life is to short to be sad and tomorrow is not promised people got to make the best out of everyday you live
Say that they are are a good person, you sympathize for them. Then say something kind, like; There are plenty of fish in the sea, he/she was merely a sea-slug...and that your friend can catch someone that's really worth staying with.
That they have value - that you care about them, and so do and will others. Though it is true that others will find and love them (new relationships) I do not find that part helpful during the initial pain. It is important to stay busy, to take the chance to push themselves to rebuild a better self, rather than go down a dark path. Take time to grieve the loss, and do not feel ashamed of that process. Help them to see the possibility of trying things they always wanted to, but could not or did not.
The most important aspect is to keep them engaged in society rather than excluded. Build new memories.