My boss, for whom I have worked for a long time, invited all managers to lunch for their Christmas present at her expense (she says it is a work development tool) but tells me the email invite I got was sent as a mistake, I feel hurt by this but am to humiliated to say anything. I feel ashamed to be so petty but it really hurts.
You may not be being petty
Are you a manager? If you are, you have a problem. You did not say whether or not you were a manager, but if you are and you were not invited to this, then you are clearly not one of the team members designated to be professionally developed. You should be examining your career options as you are evidently not one of the valued ones.
If you are in a different job/at a lower rank, then you should never have gotten an invite and yes, you are being petty.
I feel ashamed to be so petty but it really hurts.
I am sorry you feel this way. I understand that receiving an invitation and then it being withdrawn can feel uncomfortable.
Now, the professional course of action I suggest is that you let it go, and move on.
Your boss already excused herself and said it was a mistake; that should be sufficient excuse for an email mixup.
Try not to take it personally. The lunch would probably have taken place even if you didn't received the invitation, so no need to over-analyze the situation.
Not being invited to a single lunch is no reason for you to scratch the trust and relationship you have with your boss.
If there's a pattern with the other people invited - they're managers (and you're not), they're department heads (and you're not), they're from specific parts of the organisation (and you're not) - there's no need to feel hurt by this.
You could even reframe it. Your boss made a list of the people she wanted to invite - people she regarded as important - and automatically or subconsciously included you. That she reconsidered later could be a lot less significant than your original inclusion.