Over on The Lands of Nandame I wrote some comments about what to do with captured PCs.
I wrote a whole article about this back in the Pyramid 2.0 days, called "Digging Yourself Out of a Corner." It's lost to wherever Pyramid 2.0 articles are now.
My advice is simple at its core. Make sure the players know this is the progression of outcomes, in terms of best to worst.
If Capture is actually worse than death, the PCs will always try to fight it out until they die. Why play dead, surrender, negotiate, etc. when doing so is always worse than trying to pull victory out of the jaws of death? So make sure it's better than death even if it's worse than victory.
It's okay if the NPCs describe capture as a fate worse than death, and it can be miserable for the characters, but it must be fun for the PCs. Make them groan, wish they'd won, but have a war story to tell that doesn't end with "and then we all died and made up new guys." True story - I had PCs captured by slavers, once, after a disastrously handled combat. Basically more half the group decided to quit the game. Two guys wanted to keep playing. I had them sold as slave-soldiers; this suited one PC and made the other miserable . . . but it suited both players. So it worked out well, and we played "slave-soldiers" for a while until they eventually escaped. The alternative would have been to start over with new PCs.
In short, make capture interesting.
One bit I especially liked in Vornheim was the advice to make the legal system more interesting. To quote myself - "One piece I especially liked was that adventures in town generally mean breaking the law, so the law has to further the adventure not bring the game to a screeching halt."
Capture and legal consequences go hand in hand - having the cops grab you and punish you for your crimes is just a specific case of capture.
So what can you do with captured guys?
First off, no matter what the NPCs said - "Kill them all! No prisoners!" or "Take them to be eaten by the bugblatter beast!" or whatever - don't kill them all. If you do that, #2 is as bad as #3.
Next, you don't have to take all of their stuff. Players hate this intensely, in my experience. At least consider letting the NPCs give some or all of it back, or ransom it back to them, or sell it to someone the PCs can retrieve it from.
What you need to do next is figure out what the NPCs want.
What do the NPCs want?
Figure out what they want more than some PC corpses on hand.
Money? They can ransom the PCs for more than they are carrying. If the PCs need to borrow the money, let them - and if they borrow it from another NPC who they'll need to pay back with adventurous quests, all the better.
Sacrifices? Have the captors send the PCs off on a quest for sacrifices.
A quest object? Maybe they need something done that's very dangerous, maybe certainly fatal, and the PCs can be sent to do it.
Information? Maybe the PCs can spill the beans on something, and that's so valuable the NPCs will let them go.
Help? Remember Angel Eyes and Blondie? Blondie is a captive, but his captor wanted his help.
Amusement? Maybe they want you to be their team in the annual bloodsport tournament, or to see if their death traps work, or to otherwise do something that's funnier when it's not you . . . and it's often easier to escape when this is going on.
Remember, the NPCs needn't be bloodthirsty, and equally they needn't be happy with the tradeoff - it only matters if it makes some sense to them and it propels the game forward.
Clever NPCs might want to, if they basically let the PCs go in exchange for stuff, ask for a no-retaliation promise. Maybe they heard the story of Julius Ceaser and the pirates, and figure, why let them go if they'll just turn around and rob you back for the ransom? This can make the world more interesting, as the PCs will have NPCs they resent but promised not to attack.
Don't forget third party intervention
There is always someone out there who wants what the PCs have, or can do. The captors might have no use for the PCs, but they might need something that NPC has. The PCs can be bargaining chips and traded for something they don't even have.
"Sold as slave gladiators" is this, in a nutshell. The captors want money, the buyers want tough fighters, and the PCs want to not be dead.
A mysterious NPC is great here - the bandits have you, but now some mysterious wizard comes and buys you off of them, because they want money and he needs something done.
Divine intervention is a bit over the top, but hey, what if the bad guys do sacrifice you to their demon-god, and then the demon-god says, "Great, thank me you're finally here! I have a job for you, and then I'll restore you to life."
Also, think of any 3-way sports deal - I want player C, but you don't want player A. So I trade player A for player B on some other team, and then trade player A to you for player C, and all three teams got something they wanted. A multi-group shuffle of trades can make the whole being captured thing a way to find out about other groups. The orcs capture you, and trade you to the hobgoblins for money, who trade you to the bandits for weapons, who trade you to the merchant's guild in return for their bandit prisoners . . . and the guildmaster has this, uhm, private manner he needs help with, and you owe him.
Hey, they got away!
And yes, you can just have the PCs have a chance to escape. That works, especially if they get aided by the beautiful daughter of the bad guy, like in any pulp novel.
Long story short? When the PCs surrender or get captured, make it a springboard to new and better adventure. It's okay if it costs them more than victory, it should. But don't make it so bad the game ends just as if it was a TPK. Capture should always be preferable to