It was a stranger, what do you care what a stranger thinks ?
Today, a stranger passed by me and shouted: you look like a ******* pig! I'm so sad and depressed now! What should I do?
If somebody blurted that out loud at you, that MUST mean he's had a bad day. People don't usually behave as themselves on bad days. Just let it go.
Something similar happened to me years ago. My reply was, And you need some ****** manners? What is your point?" You cannot take to heart what some actual pig said. The clearly lack taste to even think about saying something like that.
People like that are the pigs, not you. You shouldn't care what people like that have to say about you, because you will encounter plenty of people like that. Some people are just pigs.