You don't. You just make it friendly and jocular. It's impossible to stop the DM vs. Player attitude because one of the hats that the DM wears is Antagonist.
What really tends to be going on in a game that degenerates is not that there is too much DM and player rivalry, but that there is not enough respect for the players by the DM or not enough respect of the DM by the players. The goal of the DM should to be cultivate respect, so that even when the DM is being a 'rat bastard' his players aren't angry about it but want to buy him a beer. The DM has to be tough but fair. The players have to feel as if they have been put in control and that whatever happens is the fair and natural consequences of their empowerment.
I've seen too many DMs, heard too many stories, played in too many games, where the DM thinks the only way to "win" is either A) kill all the players or B) mess with their minds like only a true rat basterd would.
Players in turn, having suffered in these games themselves, or having been schooled by those who have suffered, develop the counter attitude. Winning, (ie not letting your character die, be tricked, kidnapped or failing to complete the objective (whatever it happens to be)) is the only way to play. Anything else is letting the DM win.
Winning is the only way to play. You don't play to lose, because generally that disrupts the game. And that is the secret here. Though the DM must play to win, he must not be trying to win - because for the DM winning is easy. The trick to being a DM is stack the deck against yourself and then to lose with style. But if you are expecting your players to play to lose, you are being unreasonable.
These players develop a deep seated paranoia that compels them to never trust a single NPC (especially a father figure or kind old lady or someone the DM clearly wants them to trust)
What you are describing is a game where trust is never rewarded. If every father figure and kind old lady turns out to be a psychopath, of course you are going to stop trusting people. If the DM uses NPC's solely to decieve, trick, and ambush players, then its not disfunctional to not trust NPCs. Conversely, if NPC's are valuable resources that can only be accessed if you gain and keep their trust, then players will eventually adapt.
never let their characters be kidnapped or arrested (as in the above example)
Exactly why would I let my character be kidnapped? In your post I keep hearing this subtext of, "I would love to jerk my players around, but they keep pulling on their leash." One thing DMs have to get away from is creating plots rather than situations. This isn't a novel. This isn't a story you can lay down ahead of time. If your adventure depends on the players being kidnapped or arrested, then something is wrong. Of course players are going to resist having their characters be kidnapped or arrested.
and basically have their characters act like insane sociopaths who torture, loot
Which suggests a game where such behavior is rewarded, perhaps because the good guys are weaker and richer than the bad guys. Usually this sort of thing develops in game worlds where the DM is utterly stingy about the resources he makes available, where the bad guys live in death trap dungeons and the good guys live in defenseless houses and are clearly unable to defend themselves and so the players start looking for alternate sources of wealth than the direction the DM is pushing them in. Torturing and looting are generally outlets when the players feel disempowered and need to have a situation when they are in control.
and behave totally inconsistently from one session to the next (or even one moment to the next in the same session). Otherwise they run the risk of again letting the DM win.
This is the attitude I call 'neutral survivalist'. It's actually fairly realistic. The characters adopt moral or immoral behavior as they think it necessary without any strong consideration for consequences beyond the immediate. Lots of real people act the same way when their survival is threatened.
It all but ruins things for me and I don't know what to do. I've tried talking to my players (repeatedly) but like paranoid conspiracy theorists the more I assure them I am not out to get them in the rat basterd way the more convinced they become that I am just setting them up for a huge fall.
Experience is the best teacher. Your problem is you don't seem to respect your players. And apparantly, you've given them no reason to respect you - probably because they know you don't respect them.
Now the sad part is in movies, books even videogames, betrayal and loss are important to amping the stakes in a story...
See, there is your problem. You aren't trying to run a RPG. You are trying to run a movie, book, or novel. You don't have a right as the DM to set the players stakes in the story. Players choose what stakes that they have in a scenario. You can't set out to choose that this is a scenario about betrayal and loss. That's the players choice.
What can I do to combat that attitude both among my players and when I play in games DMed by other people? And does anyone else see it as the same problem I do or is this just my hangup? What do you think?
It sounds to me like you are in a group that has been burned several times before. It also sounds to me like you've not helped the situation any (though you probably aren't responcible for it). Winning your players trust is going to take time, but if you are trying to force the story to be one about betrayal or loss, and if you are trying to force the players to surrender, be kidnapped, or be arrested then its little wonder you aren't making progress on that front.
I don't know your game state, but I would suggest that talking to your players about this won't help but will be rightly percieved as just another attempt to manipulate them. There are alot of times when communicating with your players is the right thing to do, but sometimes you just have to show them.
I would suggest dropping all betrayal twists for at least 5 or 6 levels. If you want betrayal in your story lines make it about NPC's betraying other NPC's. Introduce characters that manage to communicate their moral uprightness, and make them legitimate allies. Have incorruptible Paladins, upright lawmen, clerics of impeccable virtue and wisdom, tough hardened bounty hunters, street kids with hearts of gold, wise old apothecaries, honest jovial merchants who always have the best deals, and so forth. You need characters with clear White Hats (from the players perspective of what a white hat is). If you've got a world where everything is some shade of gray or black, being a pyschopath is the natural reaction. Alot of this is going to depend on the player. Seduce them. Present them with the sort of characters that they admire and empathize with, and don't do it to trick the player. Don't do it with the intention of this being the character that is going to let the player down. Make knowing this character valuable - access to spells, cheaper equipment, information, access to the powerful - whatever the characters want.
In other words, you've got to start cultivating legitimate friendships between the PC's and NPC's. These relationships are one of several important proxies for how the players themselves percieve their metagame relationship to you as the DM.