I've only done the doorslam once, when I couldn't deal with any more stress- my physical and mental health were at stake. No matter how many different ways I tried to express that exhaustion to the friend, it would just get overanalyzed/twisted, and I'd still be pulled into some pointless, incredibly taxing conflict, when I'd already long been running on empty. I'm not a superhero, and my patience/energy are finite, and these days, spread quite thin.
It felt horribly unnatural to resort to something that drastic, & I've since tried to balance things out with that individual, & improve communication, but also maintain healthy boundaries. Some friendships require more work than others in that regard. Sometimes they require breaks. Sometimes, introverts fall off the planet a bit when they're not in the best health, & are trying to recharge. It's important to clarify that to friends, just as it's important those friends listen and try to understand, even if they don't relate. And sometimes, people just need to realize they truly cannot bridge certain gaps in perception. It doesn't have to be hateful, or cutting the person out, entirely. You can still have some basic sense of human empathy and caring for the person, but also see that- whatever the reasons- things are not healthy, & changes must be made in order for both parties to have some peace of mind in the longterm.
If those changes can't be made without the situation becoming abusive on some level, then, unfortunately, as [MENTION=16071]sprinkles[/MENTION] said, you have to protect yourself. I've experienced both, & if forced to choose between the two unpleasant possibilities- I'd rather someone physically beat me, than deal with psychological garbage constantly, & have to brace myself for it everytime I interact with a particular person. Ideally it'd be wonderful if it never came to either one of those, but ey, sometimes the things we build break down.
Using the actual door analogy- I'd say I only slammed & bolted the door when someone repeatedly kept trying to pry it open with a crowbar. My actions may not have been the most comfortable, pleasant, or tactful- which was why I'd gone back & tried to open communication with the person, very carefully. No matter how it turns out, at least there was effort made to communicate, resolve things. Even if that solution entails not keeping up ties, you've given the person some closure. If you're friends, I believe you owe them that effort, at the very least, even when that bond has disintegrated.
What I'm saying is, in short- unless the situation has become abusive, I don't believe doorslamming is necessary.