Write, then discard
Personally, I’ve used a technique that involves writing the email like you would when emotional. Rant, be unreasonable if you feel like it and get it out of your system. I like to do this in Evernote to avoid accidental sending. Then, when I’m done with the email I wish I could have sent, I delete it (or archive it for later amusement). This way, you get the anger and frustration out of your system fast. Another benefit of this technique is that you often find valuable arguments during the ranting.
Sleep on it
After you’ve written your rant, let it rest. At least until the next day, or preferably a couple of days if possible. That way, your initial emotional state has calmed down, your subconscious has started to work on possible replies and you are better equipped to craft a sensible and valuable response.
Now it’s time to sit down and write the best response you can. Say as little as possible, to avoid winding up in a never-ending discussion about minutiae. Take the other party’s intentions into consideration. Keep to the subject at hand and don’t attack the recipient. You might need to be hard, but be just and fair. Nothing triggers a flame war more than being unfair. And remember it takes two to create an argument.
Adjust and reflect
I sometimes read what I’ve written out loud. It suddenly becomes a lot clearer if it’s too harsh or too insensitive when you hear it spoken. Adjust accordingly. Another technique I frequently use is to ask myself: Will I be proud to read this in a year from now? Or: Would I be able to read this to my family without being ashamed? Get a perspective.
The blame game
In cases where the other party is blaming you for a failure, stick to facts and be the professional one. Don’t let the other guy drag you down into the mud. Avoid blame and emotional rants at all cost. It might be tempting, but it is a true and tested way to ensure the discussion drags on «forever».
Talk directly with the person
After the initial email, there might be another response. If that's negative too, or it seems like the discussion could be a long and unproductive one, pick up the phone or meet with the person. Emails can increase animosity and create fronts, and this is easier to avoid if you talk directly to the person.
Always be a true gentleman or lady in business, even when others are not. Constant professionalism and keeping to facts will win the game 90% of the time. That’s good enough for me.
In the long run, you will be better off doing business this way. Your business will benefit, and you will have a better conscience going forward.