It requires determination and discipline that you'll not break down, you'll not entertain thoughts about your ex and you'll do everything to heal and recover from the breakup.
You'll need to put a brave face when you greet each other or work together on a certain project or task. Tell yourself over and over he is not your boyfriend thus you don't need to become emotional or wish you're still in love with him.
Don't pretend you're doing fine. Act like you're doing fine.
Whenever the thoughts about pop up in your mind, snap out of the thoughts and tell yourself you are not supposed to think about him. Avoid 'stealing' glances at him.
Don't talk much. Only greetings and talk about work. Refuse any offer he has for you like a cup of coffee but do so politely.
It will be an uphill task but it is possible to heal and recover from the breakup and move on.
I have written an article on how to heal and recover from a breakup. You might want to check it out: Steps to Healing and Recovering from a Breakup.