“I couldn’t help myself. I was just venting.” This excuse has led to countless examples of business professionals who have seen their reputations damaged or careers destroyed after venting their anger with an ill-timed social media post.

According to one survey in Psychology Today, 46 percent of Twitter users say they often tweet as a way to deal with anger or to vent–for political or professional reasons. They say it makes them feel better.

They’re partly right. Social psychologists say anger is the most contagious emotion and the most likely to go viral. “Humans are social creatures who are easily influenced by the anger and rage that are everywhere these days,”  psychiatrist Richard Friedman recently wrote in the New York Times.

Anger engages the amygdala and produces a rush of stress hormones that makes it hard for all of us to dial down on our emotions. But just because you have an emotion doesn’t mean you have to tweet about it.

Abraham Lincoln had a brilliant tactic to dial down his anger during the Civil War, a time when the country wasn’t just divided–the house was “on fire,” according to historian Doris Kearns Goodwin’s new book, Leadership in Turbulent Times.

Lincoln spent a lifetime on self-improvement. He realized that transformational leaders had more emotional self-control than other people. Yes, Lincoln got very angry very frequently. But while everyone around him was losing their cool, Lincoln kept his–at least outwardly–with a tactic he called “Never signed and never delivered.”

He stood out by appearing calm, cool, and collected. Here’s how it worked.

Never signed and never delivered

According to Goodwin, when Lincoln was angry at a cabinet member, a colleague or one of his generals in the Union army, he would write a letter venting all of his pent-up rage. Then–and this is the key–he put it aside.

Hours later or the next day, he would look at the letter again so he could “attend to the matter with a clearer eye.” More often than not, he didn’t send the letter. We know this was Lincoln’s tactic because years after his death historians discovered a trove of letters with the notation: never sent and never signed.

Lincoln practiced this habit for three reasons. First, he didn’t want to inflame already heated passions. Second, he realized that words said in haste aren’t always clear-headed and well-considered. Third, he did it as a signal–a learning opportunity–for others on his now famous “team of rivals.”

In one example, Goodwin recounts the story of Lincoln patiently listening to his secretary of war, Edwin Stanton, who had worked himself into a fury against one of the generals. Once Stanton was done venting, Lincoln suggested that he vent on paper, and write a letter to the general. It must have been quite a letter because it took Stanton two days to write. He brought it to Lincoln who said, “Now that you feel better, throw it in the basket. That is all that is necessary.” Stanton wasn’t pleased, but he took Lincoln’s advice.

Stanton didn’t like Lincoln at the start of their relationship. By the end, Stanton was one Lincoln’s biggest cheerleaders, closest friends and most loyal advisors.

Nobel prize-winning psychologist Daniel Kahneman once said anger is such a primitive emotion that just reading words can set off your threat response. Social media platforms make it very easy to fire off a response.

The best response might be to write it down and come back to it later. That’s what Lincoln would do. You’ll probably feel differently when you do.

Your employees, partners, and customers are watching your actions offline and online. If they see someone whose social media posts are impulsive, angry, and ill-informed they’ll form an impression of you as a leader. And it’s unlikely to be a positive one.