If you're the one whose relationship is breaking up and he still wants to be friends.
1. Hear him/her out
It always pays to see give the other partner an attentive listening ear. Even if you are highly-strung and seething with emotion, try and put on a brave front and see what they have to say. You know the other person well enough to decide whether he/she is being genuine.
TIP: Read the guide to prevent a break up or get back with your ex.
2. Appreciate the honesty
Realize that this is not easy for the other. Irrespective that you're the one hurting, recognize that it takes guts to break up with someone if you don't see the relationship progressing the way you'd like it. Also, he's been man enough to do it in person and not choose the cowardly way out, either on the phone or even worse, just avoid you altogether till you get the message.
3. Value the sentiment
The fact that he is asking you to still remain his friend should tell you a lot about how he values you as a person. He might not feel as strongly about you as a romantic interest but that doesn't make you a lesser person, just not suitable for a relationship with him. Rather, he's telling you that he admires certain qualities about you and would not like to lose you altogether and hence retain you as a friend.
4. Give it time
Don't jump into making rash statements, like you could never consider being anywhere near him after what he's done to you. Take a step back, if you can, and objectively analyze what has happened. If you think he's been really decent about the whole thing, and has respected your feelings and sensitivities, let him know you'll think about it. Take a break from him and your relationship while you lick your wounds and heal in private.
Once you're through mooning over him, you might find you just miss talking to him and the camaraderie you shared. Isn't that what being friends means? You might discover you'd rather have him in your life as a friend, than not have him at all. If he hasn't called, don't let pride stop you from making the first move.
5. Beware though
There are some relationships that break up, with the best intentions of making a friendship work. However, there are certain prerequisites that need to be met, and certain norms that have to be adhered to. If either of you violates them, it is very difficult for two people who were lovers to have a purely platonic friendship. If the friendship has to truly work after breaking up.
Feigning friendship while harboring false hopes of getting back together. Don't agree to friendship under the guise of worming your way back into his/her affections and ultimately renewing old flames. You could be setting yourself up for serious disappointment, especially if the other person really views you as a friend.
Getting jealous of new relationships that your ex is bound to have. Friends confide in each other, and your ex will at some point tell you about the new guy or girl in their lives. While it is normal to envy their newfound happiness (even genuine friends sometimes envy each others relationships), if you find yourself becoming insanely jealous or even angry at their contentment, get out of the friendship. Intense jealousy implies you have more at stake than friendship.
Continuing your friendship if the chemistry between you is too strong. If you find yourself fighting the urge to keep your hands off him or resisting the need to take her in your arms, call off the friendship.
Ultimately, whether you decide to stay friends or not, both of you have to make the decision based on your emotional state of mind. You have to make sure neither of you gets hurt in the process. Make a few rules and stick by them. And remember, when you get into a new relationship it might even pose a threat when you say 'I'm still friends with my ex'. Not everybody can handle it.