Having dwelt with it for along time, i could relate, you turn the situation over and over again, trying to figure out the sense of what happened, how did we end up as enemies when we used to be so close, it amazes me how people can be so ignorant over the simplest things, and how we allow a single negativity to ruin an entire friendship.
Am not here today to talk about how to fix them relationships, but about how to deal with them, from my experience, there are two ways; First, you can try to reconcile what's left, be the better person you might say, maybe a simple good morning as you go into work, or for some chit-chat in the office's kitchenette, basically doing what you can do to show your good intents on patching things up, or maybe just have a normal relationship.
OR, and if the above doesn't work, you need to move to what i like to call "Changing from within", it is, in my opinion, one of the best practices that you can do to help you deal with breakups, and its very simple: Whenever we are hurt by someone else, we want the other person to feel what we felt, whether its betrayal, humiliation, or mere sadness, we expect them to revert back to normal if we play nice, and then we hit, that way they can have a taste of what they did. While that may be tempting, most of the time it either doesn't work, or doesn't satisfy our thirst for revenge, so what do we do? We start to change from within ourselves, our expectations for them, when you see them getting together to go out for a lunch break, or when you pass by and you don't get a "Good Morning", you simply train yourself not to expect it, am sure everyone of us have other colleagues that they share their work environment with, and are not "Friends", so basically you have to shift your perspective for them, they are not ex-friends, they are colleagues, you do not care if they greeted you, asked you to join them for a lunch break, or checked up on you, why? You do not expect them to, believe me, as hard as it is in the beginning, it gets easier with time, it is an assured policy to handling those situations.
Good Luck!