I like the proportion idea. This allows for there to be a 'buffering' effect, this there becomes a benefit rather then a bane to having lots of friends, and mitigates the everyone going berserk thing...
So the loner may have one friend. If this friend dies, instant madness. But the chance of that friend dieing is 1/(total dwarves).
The socialite who has lots of friends instead has a chance of a friend dieing of Friends/(Total Dwarves) and could have a formula of, as an example, 2*Friends/(Total Dwarves) percent to insanity, so that half their friends must die before they actually go instantly and completely insane. The chance of this is lower. The other side of this coin is that, with friends dieing in smaller numbers, this dwarf will be more often less happy then the loner. So many friends = a stable medium, while loner = an unstable mania: always happy, up until the end...
Also, a random question. Do military dwarves gain friend-points (or what we shall call them) from serving together, patrolling together, ect? I was speaking to the janitor today, and he was telling me about his war stories... surely relying on eachother and fighting side by side developes some powerful friendships, by his description... Of course, were they to, there would be the problem of insanity when one's group members die, unless there's some sort of way to reduce the effects, like getting happy thoughts from enjoying slaughter to counter the effects of allies dieing at the same time. It's a risky job ^.^