Go in with the attitude that you are not going to overeat and you are going to stay on plan. Remind yourself of why you are doing this and why want to stay on plan before you go. Remind yourself that you have a choice about what you eat, what you weigh, and how you look and that you have chosen to lose weight. I find that my attitude can make a big difference. If I go to the party with the attitude that I'm going to blow it; I blow it big time, every time. If I go in with the attitude that I'm going to stay on plan, I still often end up eating more than I'd like, but it's not usually quite so bad.
Grab a non-alcoholic, no calorie beverage right away. It gives you something to put in your mouth and it's hard to eat and hold a beverage at the same time.
Talk to people. Mingle, move around, get involved in a long conversation, whatever is easiest for you. It's also hard to eat when you're talking. Make it a goal to talk to as many people for as long as you can. Just don't stand next to the buffet while you're talking

!
Are there games being played? If yes, get involved in them. You can't eat and play frisbee or softball at the same time. Plus it's exercise!
Eat the veggies. Become the queen of crudites! Offer to bring a veggie tray with your own low calorie dip. Try to eat several veggies plain for every one that you eat with dip.
Have fun and try not to obsess about it too much. Whatever happens, it's only one day and you've got the rest of your life to get to your goal. I've been to so many parties; some I went to with the best of intentions and did great, some I went with the worst of intentions and did horrible, some I went to with the best of intentions and still did horrible (probably alcohol was involved

). Whatever happened, I got back on plan the next day and within a week it was as if it never happened. And even with all the party disasters, I've still progressed steadily towards my goal.
And I have to say that I disagree with cbmare. Declining invitations because of the food involved is sometimes a trap that I fall into and I don't think it's healthy. Once in a while is okay, but there's more to life than food and dieting. It's important to have friends and you won't have them for very long if you keep declining their invitations.