If you are the one doing the breaking up:
Ok, so you know it's coming. You and your significant other aren't working out. Don't worry darling, it happens to the best of us. If you know the time is coming and you are the one who is going to initiate that tough conversation make sure you refrain from making long term plans (seems obvious, but you'd be surprised...) and make sure to have the conversation in a private place, because you don't know how the other party will react.
When it comes to actually having the conversation, remain calm and say what you need to. It may help to think about what you are going to say beforehand so you don't get nervous and so you can express yourself clearly. While it's not always necessary to give a "why," you should tell the other person what lead you to your decision (as long as the reasons are valid, of course). It is essential to give him time to process what you've said and respond. Be fair and answer all of his questions and talk with him instead of dropping the bomb and running.
After the breakup things can either be really easy or really tricky. If you don't have to see the person anymore and if your paths don't normally cross you should keep it that way. However, if you are forced to see one another I encourage you to be friendly, but don't seek out his company too much. For you it might not be a big deal, but could be very painful for the other person. Remember that the whole point of etiquette is to make the other person feel at ease so keep his feelings at the forefront of your mind.
When it comes to social media, it can get even more difficult. Obviously, relationship statuses should be removed and I would suggest that you simply put "no information to show" instead of proudly proclaiming that you are single; this can come across as insensitive. Treat him how you would want to be treated and you will be all set.
If you are the one broken up with:
I am truly sorry. It can be so hard to be broken up with, especially if you did not know it was coming or if your significant other did not read this post and know how to behave. You can be left feeling confused, wondering why. Although your emotions may feel out of control, you can be in command of your response and actions. When looking for a role model of someone who handled a breakup perfectly, I always think of the baroness in The Sound of Music (I searched YouTube but could not seem to find the scene from the movie). When Von Trapp breaks things off with her, she wishes him well and removes herself from the situation with such style and grace. Aspire to be like her!
When having the conversation do your best to remain in control of your emotions. Ask any reasonable questions you have, express your sadness, but then walk away. As Angelina Jolie said, "It is better to have nobody, than to have someone who is half there, or doesn't want to be there."
I could write a whole other post about how to deal with a breakup, but right now we're just looking at the etiquette of the situation so refrain from talking to everyone about it and do your best to go about your business like normal. I'm not suggesting that you don't take time to mourn the relationship, but ensure that it does not affect your work and other areas of your life. If you have to see him because of circumstances outside of your control be pleasant but don't seek him out. Take the time and space you need.
And about social media...while you don't need to unfriend him, you should certainly block his posts or stop following him. There is no need to continue to know what he's up. Cut the ties girl!
So that's what you need to know! Your main goal is to put the other person at ease, behave in a manner that you will be proud to look back on, and although it may not be what you wanted, it is essential that you remember that your reactions define who you are, so tread carefully. Best of luck to all the forlorn hearts out there.