Whilst McCoys frustration is does indeed come down hard on Spock it is worth remembering that the area of space they are in causes heightened aggression and emotion
I just watched the episode again today and surprised I never noticed it before (considering this is an episode I watch a lot) but McCoy almost faints at one point in the episode.
It's during the scene right before they all see Kirk. McCoy again starts coming down on Spock but then realizes what he is doing and apologizes and Spock forgives him, even calling him Bones. Right after this McCoy faints and Spock has to hold him upwards to keep him from falling.
So whether it was the space or the fact that McCoy was just under physical and emotional stress from looking for the antidote, he was obviously feeling some ill effects.
Of course I don't think this excuses his behavior in the episode. I think McCoy was wrong. But characters are allowed to make mistakes. The fact that he made a mistake and came to that realization (even with a little help) is what makes McCoy a character I can relate to. What can I say I don't need characters to be perfect.