You might be able to mod them such that they are unlikely to make friends, though that would have its own problems due to preventing marriages and such. To do that, you'd probably add the [PERSONALITY:FRIENDLINESS:0:15:30] to the dwarf creature entry, or possibly similar numbers, and possibly other related personality traits like gregariousness or trust.
If you're consistently losing that many dwarves to tantrum spirals, though, you're doing something wrong. You're letting dwarves make friends, which means that you either don't have a big enough meeting hall, aren't keeping your dwarves occupied enough, or both. You also aren't doing enough to compensate for deaths; as mentioned, a better dining room, nice individual bedrooms, art pieces scattered around the fort to be admired, good food and drink, and similar happiness boosters are not that difficult to put in place and really do give a good buffer against these things.
Edit:
Why would this have something to do with tantrums?
Dwarves don't grieve for strangers or passing acquaintances. They'll only get unhappy thoughts if a friend or family member dies. If a dwarf is idling near another dwarf, they'll talk, gaining various speech-related skills, but also becoming more familiar with one another and, fairly quickly in some cases, friends. More friendships thus occur if you let your dwarves idle. As friendships give minor happy thoughts while active but devastating unhappy thoughts when they violently end, friendships are a bad thing, and are the main - perhaps sole - reason for most tantrum spirals.