It was 'The Winner' by Donald Westlake, collected in 1973's Science Fiction, edited by Sylvia Z. Brodkin alongside Bradbury's 'A Sound of Thunder'.
Not very far in the future at all, political prisoners have been
implanted with a small black box that causes them to feel unbearable
pain if they venture too far away from a signal transmitted inside
their unwalled and mainly unguarded prison. It’s a pilot program,
that may soon be used in all prisons, for all crimes.
A poet has been imprisoned for unknown crimes. He refuses to accept
his imprisonment, and tells the warden (named Wordman) so, before he
walks out into the field surrounding the prison, in ever greater
agony, until he collapses. His screams can be heard from the warden’s
office. Wordman feels every scream in his soul, but he wants the poet
to learn his lesson. Then the screams stop. They search for the
poet. They do not find him.
The poet was picked up by a farmer, who not understanding what was
going on, took him to a doctor, who does understand what is happening,
and thoroughly disapproves. He removes the black box. But by then
the authorities have found them, and both are now imprisoned, with
black boxes inside of them. The poet says he’s sorry. The doctor
says not to be. At their earliest opportunity, they both intend to go
walking into that field again, together. Wordman thinks they’re both
insane. But the madness may be catching.