The protagonist appears in a teleportation station, apparently very sick. His first thoughts are about a mishap in the teleportation process, and is trying to recall the steps you're supposed to take to keep it together until the worst of it passes. The man recovers shortly, but realizes he's not in the teleportation station near his home, but in a completely foreign place. He also sees there is no return teleporter. Completely unaware of how he got to this place, or why he's there, he exits the station and tries to find help in the town outside.
The man asks passersby for help, but is ignored at best, and treated roughly at worst. It is a very unfriendly place. Parched with thirst, he approaches a woman who has a mug or cup of something. He asks her for a drink, but she clutches the drink to her chest, saying something like "mine, mine. I carried wood for my share." She sullenly directs him to a large structure where he can get water instead.
I'm a little fuzzy on how the next part of the story goes. At some point, he meets a seasoned old man, who has been living on the planet for some time. I believe this man explains to the protagonist he is on a planet used exclusively as a prison for "the worst of the worst", or something like that. The idea behind it being, it was a foolproof way for society to deal with the worst offenders, in a way that cost little and represented no risk. There is no way off the planet, which is uninhabited, outside of the town/city the prisoners call home. The only non-prisoners are the staff inside the structure where the protagonist was told to get water. There is a water and food dispenser set into the outside wall, and a small chamber a seriously ill or injured prisoner can submit themselves for treatment. There is no other way to access the structure.
The protagonist, now horrified that he's been put on a planet with hardened criminals, wants nothing more than to see one of the staff and try to explain to them that a terrible mistake has been made. He enters the chamber, but the computer scanners detect that there is nothing physically wrong with him, and he is put back outside the structure. The older man has a sort of "I told you so" attitude, but takes the despondent protagonist under his wing.
We learn that the older man is a serial murderer, who poisoned a number of people before being caught. His skills with chemistry also make him a skilled brewer, though, and thus popular. The prisoners figured out long ago how to ferment and distill a local plant into a rough, but potent alcohol. This is what the woman in the first part of the story was carrying in her mug. The older man jokes he knows a few tricks that would make it taste more palatable, but his history as a poisoner make people wary of his "additions."
The older man treats the protagonist to a mug or two of the beverage, and tries to get him acclimated to his surroundings and some of the other prisoners. Despite this, the protagonist becomes increasingly desperate, and finally seizes upon the idea of injuring himself so he can gain access to the staff. He asks the older man to cut off a joint of one of his fingers. The older man complies, but his sadistic nature kicks in during the process, and he gleefully hacks off two entire fingers.
The protagonist again lies down in the chamber, and this time is accepted into the structure. He wakes to find himself strapped to a table, with a doctor working on him, and several well-armed security personnel in close proximity. The protagonist pleads his case, and asks the doctor to search his records to see the mistake that has been made. The doctor, moved by the protagonist's plea, does so. It is then that we learn the protagonist is not there by mistake. He brutally murdered his own wife, and was sentenced to the planet justly. He simply has forgotten due to whatever trauma he suffered when he was teleported to the surface.
The story closes with the protagonist being treated and returned to the outside world. The story closes with the protagonist, still unable to remember his crimes and in total denial, saying something to the effect of "how am I ever going to get home to see my wife now?"
I think this one is late 2000's, or even 2010's. I'm pretty sure I read it in a sci-fi magazine (can't remember which one, obviously), and not an anthology or other collection.