Sorry, I know this thread is old, but it's something that came up in one of our games too so here's the explanation.
You musn't confuse mind and soul. The mind is made up of the physio-neurological process of the human (living) body. It is the result of electrical impulses through the nervous system and the generation of chemical substances through the body. The ability to think, imagine as well as consiousness, emotions, these are all part of what is called the mind.
In real life, when you feel an emotion, let say fear, it's your brain that associates your body response to an external stimuly and stimulate the emission of chemicals and hormones through your body, thus giving you a sensation of stomach cramp, or making you sweat, increases your heart rate, etc. Then you consciously (more or less) associate that response with the situation to come up with an explanation for your reaction. If the stimuly is an ugly creature that surprised you, you could be startled or scare. If it's a person close to you that touched you you could think of it as love. Truth is those reaction are very similar from a physical standpoint but the mind process it differently which then result in completly different view of the external world.
A soul is a conceptual entity. It is intangible, and thought to be made of so god-like force or universal energy that fills all living creature. Some might say it comes from some other unseen and ideal world, where souls will return afterwards, while other might think of an invisible paralelle universe made up of some sort of soul energy which surronds and penetrates us!
In real life, a mind is a very real thing, although extremely complicated and far from fully understood. On the other hand, a soul is not as widely recongnize to actually exist; no one as actually seen one (no one you know), it might or might not affects things around or even our physical body, and you can explain the existence of things that live without the necessity for one. It's intangible and conceptual, it's an attempt to explain things we don't understand.
In D&D however, mind and soul or both 2 very real things. Most living creature have both. The mind allowed them to think, act and basically be living creatures; it gives them emotions, make them dream, etc. The soul is the collection of all the character experience, his identity, whether it's built with the current life or comes built-in, and leaves the character at his death. Some creature like outsiders and elementals are souls given a physical body, and the soul is destroyed when they die (the soul does not 'depart'). Nevertheless, both are an important part of every living creatures.
In the light of all this it's easy to understand undeads' immynity to mind-affecting. While some undead do still have soul (ghost, vampire, lich), the fact that they don't have physiological functions prevent them from having mind. Thus vampire could still be enraged but the absence of physiological function prevent this rage of having any actual effect on his body; he would not generate adrenaline and therefore not gain moral bonuses from rage for example. Or an intelligent undead could be weary of a situation, but is body will not tremble in fear because there will be no chemical generated by is body. They can't be paralysed because the body doesn't actually moves, magic moves it, and the would not be hypnotized because while they see it's definitely not through neural response and is, I guess, attribuable to the unnatural forces at work.
But the mind is not what control the body anymore. The body is animated through some very unnatural phenomenom, usually by magic or some divine intervention.
Sure a vampire could talk about love, but he's not feeling it in his body; his soul might be longing for it, for a lost love, but it's just an illusion, or rather, he is 'feeling' it because love is also a concept, something that our mind makes up, and I guess could be remebered by the soul.
Magic that affects the soul can unsually affect intelligent undead (trap the soul for instance), but mind affecting effect will remain useless. The same goes for plant type (no nervous system, no chemical stimulation in the usual human sense), as well as construct and ooze (which are usually mindless on top of that).
The only exception I can think of are the Green Star Adept (CAr), who as no physiology and yet is not immune to mind affecting and elementals, who are not immune to mind affecting, but then I guess you can't understand every supernatural things in term of real life explanations.