I was literally dismissed for being an older woman

I was at a work Xmas thing at the weekend. I was laughing & joking with some colleagues I hadn't met before, some men in I'm guessing their 20s, early 30s at most. This guy tells me to "fuck off, you're like nearly 50!" I was stunned. I apologised. I left. I have felt so grotesquely unattractive, worthless, humiliated, and angry all week. I'm guessing he had a lovely little laugh and feels nothing at all. I guarantee he would not have said that to a man. But I'm a woman, my usefulness has been spent and now I mustn't be seen or heard of again.