1. First, drink in the rude awakening: Accept that you are not being desired the way you want. This is actually hard until you let go of your sense of self entitlement, that feeling that you are supposed to be wanted, you are supposed to be needed, you deserve her/him. Fact is that you are not loosing out by letting go, you are simply accepting the fact that that person does not see you the way you see them. Admitting to that will help you keep a healthy dose of self-esteem.
2. Feel Bad About It: I know exactly how this sounds on the surface, it is not a real advice. But I have noticed that the reason why we undergo prolonged suffering is because we are in denial of what we are truly feeling. You already feel bad about it, but you try to remind yourself of little victories that negotiate that feeling. Bad news is, you will only draw yourself into a stream of uneasy battles, first with yourself then with the other person to overcome those feelings. Feeling bad about it is the right reaction, and the right reaction is a step away from the right next action.
3. Call it a bad idea: You like her/him, she/he doesn't like you the same way. The implication of this is that you two cannot have something special because you do not like each other the same way. If that was the picture of a relationship, you will not be happy, because you will outspend your energy in an unbalanced relationship. A status is not worth your happiness. Make it clear that your happiness too matters, and that is hinged on being desired in a special way. If this person is not willing to give you that, well then it means you have to find another that will willingly give you what you want. So in a nutshell, withdraw your desire and save it for another.
4. Be a friend: Duh! If she says she just wants to be friends, you realize that is all that you can get. My advice, take it. It might be very hard going back to being friends as normal, but journeying back to where you started is one way you can recover. Learn to appreciate the person as a friend and get rid of any extra expectations you have. This is what it means to be a genuine friend. This step is actually telling you to be selfless. What will you gain from this? There are no guarantees, but you would have done well in handling things the best possible way and if the friend does not appreciate you for that, I promise to give you a medal if you ever meet me.
5. Wear a cape, or at least a t-shirt: I mean, be the bigger man, the matured party, climb the emotional high ground and operate from that level. The feeling of disappointing another might not go well with him/her, so put that into consideration and help the other party realize that you can actually be happy (if not happier) being friends. This will not only make the other person respect you, it will boost your self esteem and help both of you deal with the friendzone well.
6. Move on: This cliche is necessary, but you have to move on in the right direction and only after you have gotten over the negative feelings that welled up from the friendzone experience. Technically there is no such thing as a rebound from a friendzone, but watch that you are going for what you want, not running from what you cannot get.
This is all I've got on this. Remember you have to communicate all these steps, so be sensitive to know when to apply which step as they may not work out in any particular order.