It can certainly be a struggle. A couple thoughts. Beverages can often be a safe option. If you are standing around with a drink in your hands people won't ask too many questions about it. When it comes time for the line through the buffet just break off at that point, you can say something like, I might come back when the line dies down a bit, and most people won't even notice.
Depending on the function, I generally try to show up for a bit, talk briefly to a couple people, then fade away silently. Key points are that people will expect to have seen you there, and nothing more. So as long as they saw you there, they won't notice anything amiss or even think about it.
So, basically, pretend to enjoy yourself, have a beverage in your hand, mingle briefly and move around a bit, then leave when appropriate (don't be the first to walk out, and don't draw attention to yourself, a cell phone can be useful here as well, if needed, since if you have to take a call it's expected to move somewhere more private, then just don't return.)
Anyway, good luck and stay safe.