Lunch meetings happen. Dinners with the in-laws happen. Company banquets and picnics, dinner at a friend's house, bridal showers and pot lucks all happen. It's a regular part of life. People ask me quite often what they should do.
There isn't just one answer, but there are some guidelines.
First of all, if you are changing your eating habits as a change of lifestyle you are going to run into this for the next 75 years or so (I'm an optimist!) Don't let your eating habits isolate your from the rest of the world. Remember that it's what you do 95% of the time that makes up the composition of your body. You'd have to REALLY pack it in for one meal to make that much of a difference. If your diet is tight most of the time, it's absolutely fine to let go of the control here and there.
Secondly, there are very few times that there will be absolutely NOTHING healthy for you to eat. Simply make the best choices possible from the options that are available. If the meat is fried chicken, discreetly pull off the skin and batter. If the sides are all mayo-loaded salads, take a tiny spoonful. If the dessert is cake and ice cream, have a small serving or pass on it. Load up on garden salad if it's available, and look for a fruit or veggie platter. If you leave hungry, just eat when you get home.
These occasions don't usually completely sneak up on us. If you know it's happening and you are certain there aren't going to be healthy options, and you really don't want to blow your diet that day, eat a good meal before you go and just nibble on a few things while you are there to be sociable. Trust me, the other people are so busy eating they will hardly notice that you are NOT eating.
Most people have off plan meals here and there. You might consider it your off-plan meal for the week, and just enjoy it in reasonable amounts!
Another suggestion would be to donate something to the meal. Make a veggie platter, a healthy dip with homemade pita chips or a delicious fruit salad. Most hostesses are delighted when someone offers to bring something to add to the meal.
While it is very important to focus on your goals, rare is the time that you have to be 100% focused, 100% of the time. If you aren't a fitness competitor going into a contest, it's unlikely that you can't afford to let go of the reins a little bit. Don't let your healthy habits turn you into a social pariah. Within limits, give yourself permission to go off plan now and then. Don't do it every day, but don't lose your connection with people for the sake of keeping things clean.
And the most important advice of all? Don't hesitate to get right back on your plan the very next meal. Don't use the off-plan meal as an excuse to blow off the rest of the day, the weekend or, worst case scenario, the week. Enjoy your off plan time and then focus your efforts back on your goal.