David Peters' life was supposed to be one continuous arc of piety and service.

But for the U.S. Army chaplain, it's ended up a more circuitous route. Peters lost the very faith he was supposed to embody for his soldiers — but has also found his way back.

Peters grew up in a fundamentalist evangelical church in Pennsylvania, served as youth minister and then went to war in Baghdad as a chaplain in the U.S. Army in 2005.

At the age of 30, he was serving as a chaplain for the 62nd Engineer Combat Battalion, a unit that built guard towers and repaired roads. "So they were operating all around Baghdad, at night, in the streets, in the neighborhoods — and it really exposed [them] to an incredible amount of danger," he says.

Peters' duties included administering last rites, grieving with survivors and listening to soldiers lament their broken marriages back home.

After 12 months in a combat zone, it was time for Peters to go home. But when he arrived back in Texas, Peters realized that he had changed.

"I found that going to war was really pretty easy and it was kind of exciting, and there was a lot of energy around it," he says. "But when I came home, I really fell apart emotionally and spiritually."

He had symptoms of PTSD, and his own marriage had shattered while he was away at war.

His homecoming was not unusual, it turns out.

Former Army Capt. Kurt Stein, the signal officer in the engineering battalion, grew close to Peters in Iraq. "The real crisis," he says, "is when we were deployed, we were always told, 'When you guys get back, December 2006, all your problems are gonna be over. You're gonna be a hero, your families are going to be glad to see you.'

"For David and for a lot of us, that just wasn't the case."

Peters says it was his lifelong relationship with God that suffered the most. In fact, the God he had taken with him to Iraq — the benevolent deity who loves everyone and rewards the faithful — that concept of God died along with a whole bunch of brave soldiers, he says.

He had a hard time even going to church anymore.

"The church was asking me to confess my sins, when I felt like God had done far worse things than I've ever done," he says. Like "standing by and not really doing much for the world that's full of war and conflict and despair, loss.

"I looked at my own life and I felt that way. I'd just gotten divorced. I was just really angry at God for disappearing on me when I needed him most."

Peters wound up working as a chaplain in the amputee ward at Walter Reed Army Medical Center in Washington, D.C., meeting with veterans whose troubles seemed to dwarf his own.

He also worked in the psych ward, where, he says, "there was a thin line between the patients and me."

Outside of work, his life had imploded. Newly single, he dated a succession of women because, he says, sometimes they "can take the pain away."

His younger sister, Sarah, visited him in D.C. and noticed a dramatic change. "He was drinking a lot. I just remember him being very angry at people — just things that were so out of character for him," she says.

Last year, Tactical 16, a small veteran-owned press, published a slim, anguished memoir that Peters wrote about his journey. In the book, Death Letter: God, Sex and War, he writes, "I went into the business of religion to understand death."

Since the book came out, he has gotten emails from others — "Army chaplains who have experienced real transition like I did when they came home," he says. "And yet, they were religious people — they weren't allowed to have problems."

Peters had to start over. Because he was divorced, he had to leave the Bible Fellowship Church that had endorsed him as a military chaplain.

He eventually found a home and became ordained in the Episcopal Church. He also remarried; he and his new wife are expecting a child next month.

"To start over, to start a new marriage, to start a new job, to start in a new church — all those things took a great deal of, just, patience," Peters says.

The trauma of war and divorce deepened his spiritual self, in such a way that he can now connect, as a priest and chaplain, with others who are living through a dark night of the soul.

Now 39, Peters is on the staff at Grace Episcopal Church in Georgetown, Texas, outside Austin. He still serves as a chaplain in the Army Reserve up the highway at Fort Hood.

Copyright 2016 NPR. To see more, visit http://www.npr.org/.