It's obnoxious as fuck. I've only occasionally experienced it, but my wife, by virtue of being a woman, has to put up with it all the time.
The last time it happened to me, I was at one of the worst points in my life, drifting through a supermarket, a step from tears, just trying to keep a grip, and some jackass pops out and says, "Smile, buddy!"
I told him to get fucked. Hey, buddy, it's all I can do to keep this mood disorder from spiraling into chaos so I'm laughing, crying, and shouting at the same time. I don't need some outside force trying to stick a crank in my head and manipulate my mood so THEY can feel better. Because it's not about me, it's about some jackass who thinks he's spreading love and joy by vomiting up platitudes to people whose life story he is completely unaccquainted with. If you get off on attempting to manipulate other people's moods, go stand in front of a mirror and do it until your gums bleed, but leave me out of it. Have a kid, buy a fucking puppy, rent a stage and tell happy good time stories to the kiddies, but leave strangers alone, you dick. Life can be hard enough for some people, without random assholes demanding they alter their mood for a three second encounter.