It will feel awkward, but the feeling is only temporary so just roll with it.
Your first response might be to run. Don't do it. If you've seen him, he's probably seen you. Taking flight makes you look silly so stay put and be confident.
Avoid talking too much to prevent yourself from saying something you'll regret. Don't talk about the past: the relationship is over for a reason. Don't gloat and bring up your new relationship. If he asks, just tell him you've moved on and let his imagination fill in the rest.
If you know you're going to be at the same function as your ex make sure you look good. In fact, try for amazing. There's no better revenge than looking your best. Take all that anger and sadness and put it into self-improvement.
Be nice to his date and resist the urge to be mean or cut them dirty looks. Be an adult and keep it pleasant.