NASHVILLE — The first time I heard Mary Gauthier sing, it was 2005 and a song called “Mercy Now” was playing on the car radio. My father had been dead two years by then, but my eyes filled instantly with tears at the first line — “My father could use a little mercy now” — and I had to pull over to the side of the road because I couldn’t see to drive. “I love my father; he could use some mercy now,” sang Mary Gauthier as I sat behind the wheel of my still-running car and wept.

The first time I heard Mary Gauthier talk, it was 2016 and she was asking a question at the Southern Festival of Books. The fiction writer Odie Lindsey was reading from “We Come to Our Senses,” a story collection about American veterans after the first gulf war. When he stopped to take comments from the audience, a woman on the front row asked one of the most insightful questions I’d ever heard at an author event. Later, walking down the wide marble stairs of the Nashville Public Library, I caught up with her and introduced myself.

“I’m Mary Gauthier,” she said, holding out her hand.

“Oh, my God,” I said. “I love you!”

“I love you, too,” she said.

Apparently, when a complete stranger says, “I love you,” to Mary Gauthier, she says “I love you” right back.

This impulse to empathy courses through her new CD, “Rifles & Rosary Beads.” Written with American veterans and military family members, these songs are the result of an innovative nonprofit called SongwritingWith:Soldiers, which pairs master songwriters — people like Beth Nielsen Chapman, Jay Clementi, Marshall Crenshaw and Gary Nicholson — with servicemen and women who have returned from war physically, emotionally or spiritually wounded.

“There’s no diagnoses or assessments,” said Ms. Gauthier, a Louisiana native whose name is pronounced “go-SHAY.” Instead, it’s the opportunity to turn trauma into art. By the end of each weekend-long retreat, each veteran’s experience has been transformed into a song.

In some ways Ms. Gauthier is ideally suited for this work. An alcoholic in recovery for 27 years, she understands confusion and shame, powerlessness and anger. “I’ve always been drawn to the hard story, the trauma, because I think art can turn it around,” she said in an interview. “In a lot of ways, songwriting helped save my life. Recovery stabilized me; songwriting gave me a purpose.”

In other ways, writing with military veterans might not seem like a natural fit for Ms. Gauthier, a lesbian and an outspoken liberal who received death threats because of the antiwar sentiment in “Mercy Now.” When the song was released, Ms. Gauthier had to call the F.B.I. because trolls were sending her pictures of beheadings with captions that read, “Tick-tock, tick-tock.”

When the SongwritingWith:Soldiers founder Darden Smith invited her to be part of a veterans’ retreat, she hesitated. “I had a head full of stereotypes of what I thought a soldier was,” she said.

What she learned is that the military is a microcosm of American culture. “It’s a lot of women, people of color, gay men and lesbians, Hispanic, all faiths,” she said. “It isn’t the straight, white-guy conservative who likes guns.” On songwriting weekends, politics is nowhere to be found.

Each veteran or family member is paired with a songwriter, a process that begins with the participants’ own stories. Some of the veterans take longer than others to arrive at a place of candor, but eventually the songwriter’s basic questions (“When and where did you serve?” “What branch were you in?” “What did you see when you got there?”) give way to harder questions (“Is there something you feel deep inside you need to say?”), and the shape of a song begins to emerge.

Once Ms. Gauthier picks up the guitar and begins fiddling with a melody, that’s when the floodgates open. “Melody’s like tweezers that go into the infection and pull out the wounded part,” she said. “You can almost not stay silent in the face of a melody that matches your emotion. You feel seen. There’s a myth that soldiers don’t talk. Well, this generation will.”

My father-in-law, who served in Korea, often points out that the generation after his was the first not to face the draft, and I wonder if this is the difference Ms. Gauthier means, but she shakes her head. “There’s before Oprah and after Oprah,” she said. The willingness to voice vulnerability is just part of the American psyche now.

The songs in “Rifles & Rosary Beads”— chosen from among the roughly 40 Ms. Gauthier has written with veterans during the last five years — reflect the full gamut of the military experience: fighting, injury, death, camaraderie, sexual assault, fear and moral trauma, which happens when service members can’t reconcile what they’ve done with the people they believe themselves to be. Many of the songs wrestle with the unexpected challenges of homecoming.

“Soldiering On,” written with a Marine veteran named Jennifer Marino, points out how the attitude that can save your life in wartime (“Suck it up, shut it down / It don’t matter how you feel”) is the same attitude that will eat you alive when the war is over: “But what saves you in the battle / Can kill you at home / A soldier, soldiering on.”

A song written with Beth Nielsen Chapman and the wives of six service members, “The War After the War,” acknowledges the sacrifice of military spouses. “Who’s gonna care for the ones who care for the ones who went to war?” the song asks in its very first line.

In a documentary directed by Joshua Britt and Neilson Hubbard about the making of “Rifles & Rosary Beads,” an Army veteran, Josh Geartz, says he was suicidal after he returned from Iraq with serious wounds from a bomb blast, but that his experience with Ms. Gauthier gave him hope. “The session that I had, where I was able to tell Mary, who I wrote with, things that no one on this planet knows — that’s kind of where that flicker of hope started,” he said. “Right there, that moment.”

Ms. Gauthier does not use the term “healing” in connection with these retreats. “Heal is so woo-woo,” she said, and probably unrealistic in the context of war. Songs, even powerful songs written with veterans, will not eliminate the tragedy of veteran suicide, and Ms. Gauthier knows that. “The hope is that this is a rung” on the ladder out of a dark hole, she said. Just the first rung. “But a rung is a big damn deal if you haven’t been able to find one.”

Most of the service members who co-wrote the songs on “Rifles & Rosary Beads” are not musicians, but Mr. Geartz, who co-wrote “Still on the Ride,” is a skilled harmonica player. At a CD-release performance at the Franklin Theater on Feb. 23, Mr. Geartz rolled onto the stage in his wheelchair and performed with Ms. Gauthier on his own song, as well as on Woody Guthrie’s “This Land Is Your Land,” the final song of the set.

When I left the theater that night, several dozen people were already lined up at the autograph table. I had a feeling a lot of them were just waiting to tell Mary Gauthier they love her.