This one has been bothering me for 10-15 years. I feel like I could have read it in an early WIRED issue. For a long time I'd assumed it was a Cory Doctorow story but he assured me that it was not.
The story is set in a future where people have sensory implants that allow them to change details in their world. It could make your wife 27 forever, customize advertising, or completely reframe contexts.
Most people would tailor positive experiences but at some point the protagonist goes to jail, where he is placed with a tortured man who chooses to permanently perceive his reality as though he is suffering in eternal torment... complete with fire, brimstone, devils.
I don't remember the dramatic arc but the concept of the hell filter - that a masochist or nihilist would choose such a reality voluntarily - has fascinated me ever since.