Isolating dwarves is harder, in that they get fewer happy thoughts and it's difficult to set up a fortress that allows it to work. The bonus is that deaths are much less likely to cause spirals.
I prefer the other method: insane amounts of happiness-generating features work wonders at softening the blow of even the greatest tragedy. Even when someone does snap or die, it's less likely to continue to spread.
I go with legendary dining rooms (much easier than you'd think; just carve a bigass room and plop down some tables and chairs, no need to decorate if it's big enough); I have 2x3 hallways leading inside with floor grates, and have waterfalls going through the hall to generate mist on every dwarf that passes through. Any mist generation works, I just use my indoor waterfalls since I consider mist generators too exploity for my tastes. I try to build a public baths as well inside (statue garden around a pool, designated as a water source, with a soap stockpile nearby). Dwarves like soapy baths, and admiring statuary. If you get enough animals from trade or traps, a zoo is another great idea. Private bedrooms (even just 1x3) and cooking lavish meals only also help a lot (food production is so ridiculously easy right now that any decent fortress will have PLENTY of plants, meat, and/or fish to provide lavish meals on top of booze).
All these meeting places also result in more parties, which means more friends and more happy thoughts. Dwarves really have a hard time getting suicidal when they are clean, misty, with a great zoo and luxurious accomodations, plenty of great food and drink, and parties everywhere with beloved friends all around, and a room to call their own at night.
Plus, let's face it, your fortress looks a lot more like a grand and opulent mountain home with all those luxuries sprawled across the place.
Do try to avoid assigning pets, though: pet losses hurt a lot. I try not to give more than 2 war/hunting dog escorts to any single dwarf. More than that, and they can snap if their beloved pets are slaughtered in an ambush or in battle.