Long before we had a president who sent out funny Twitter memes to score political points, another president was particularly effective at using humor to achieve his leadership goals.

Abraham Lincoln won the Republican Party’s nomination to challenge Democrat Stephen Douglas in the 1858 U.S. Senate election in Illinois. Lincoln gave no ground to the incumbent Douglas — a towering figure in national politics — in the so-called Lincoln-Douglas debates in the weeks preceding the election, winning over rural audiences with his humor and homespun wisdom.

Douglas once questioned Lincoln’s sincerity by calling him “two-faced.”

“I leave it to my audience,” Lincoln responded. “If I had another face, would I wear this one?”

Lincoln won the popular vote but lost the election because state legislators — not voters — decided the outcome. He defeated Douglas two years later in the 1860 presidential election.

Lincoln, who was born February 12, 1809, remains our most beloved president. There are reasons for Lincoln’s enduring reputation more than 150 years after his death: his well-chronicled honesty; his courage as president during the Civil War; the stirring poignancy of his Gettysburg Address; the power of the Emancipation Proclamation; and his death at the hands of an assassin days after the war.

There was a sense of decency to Lincoln that goes unappreciated: And it’s that decency, reflected in his sense of humor, that is worth remembering in the age of Donald Trump. Lincoln’s sense of humor is well chronicled in my forthcoming book, “The Art of the Political Putdown.”

Lincoln stands in stark contrast to Trump and other politicians who use words as a blackjack to injure anyone who dares criticize them. Lincoln often made himself the punchline, leaving the recipient of the response with a smile and not a bruise, and, in doing so, winning the affection of his audience.

He often made jokes about his homely countenance — like the story he often repeated about the day he was riding his horse when he was confronted by a hideous old woman who aimed a shotgun at his face. “I always said if I ever met a man uglier than myself, I would shoot him on the spot,” she said.

Lincoln responded: “Ma’am, if I’m uglier than you, fire away.”

Lincoln’s humor reveals a sadness that followed him throughout his life. “No element of Mr. Lincoln’s character,” Lincoln’s friend Henry Whitney said, “was so marked, obvious and ingrained as his mysterious and profound  melancholy.”

Lincoln’s law partner William Herndon said, “His melancholy dripped from him as he walked.”

Lincoln’s only brother died in infancy, his mother died when he was 9, and his only sister died in childbirth. Ann Rutledge, who some consider the love of Lincoln’s life, died of typhoid fever. Lincoln’s marriage to Mary Todd was unhappy. Two of their four sons died before they were 13 and a third died when he was 18. And then there was the carnage of the Civil War that began soon after the beginning of his presidency.

Laughter served as a salve against Lincoln’s suffering. He referred to laughter as “the joyful, beautiful, universal evergreen of life.” When he told a joke, a friend said, “his face loses its melancholy mask, his eyes sparkle and his whole countenance lights up.” When he delivered the punchline, his laughter exploded, punctuating the moment and his audience laughed even louder.

Edwin Stanton, Lincoln’s secretary of war, often grew impatient when Lincoln told a humorous story in Cabinet meetings during the grim years of the Civil War. “Mr. President, why are you always joking?” the exasperated Stanton said.

“’Stanton,” Lincoln replied, “don’t you understand? If I can’t laugh, I would die.”

So, on Presidents Day, let’s give deep thought to how our 16th president dealt with some of the most difficult situations our nation has ever faced.