I suspect that approaching someone like this gives them exactly what they want, so I wouldn't play along.

But if such a person was in my social or professional circle I'd freeze them out, not to teach them a lesson but because I don't want to be around people like that.  

And if he - or she - asked my why I was being distant, I'd give them an honest answer. Not in a preachy way because that's not going to change them, but in a honest matter of fact way.

Ultimately all the berating or preaching in the world probably only fuels people who choose to be like that.  Social isolation is infinitely more likely to have an effect, particularly when it comes from someone who doesn't give them an excuse to exercise defensive belligerence and flip you the bird.