Definitely published no later than 1974, set in the future on Earth.
I only remember the final scene. A man visits his ex-wife, an official state-registered prostitute whom anyone can legally use. I remember a sentence, "you would never have guessed she was thirty".
After seeing her he's trapped in a room or cell and a starving mob is outside and he's literally ripped to pieces as he tries to escape. It's written in the third person.