At a House hearing this week, several members of Congress passed summary judgment on Army Sgt. Bowe Bergdahl, just back from Afghanistan after five years as a guest of the Haqqani network.

In trading five Taliban detainees at Guantanamo Bay, Cuba, for the 28-year-old from Idaho, said Rep. Randy Weber (R-Tex.), “we got a conventional weapon — some would say a dud — and they got five nuclear weapons.” Rep. Adam Kinzinger (R-Ill.), who as an Air Force pilot served in Afghanistan and Iraq, said it is important to remember the “kind of a mutual understanding that your country will never leave you behind if you never leave your country behind.”

Even if your sanity crept away before you did? Or is the mental health of soldiers only a concern when it’s too late and they’ve committed suicide, in some cases after the Veterans Affairs Department failed to get them treatment in time?

Bergdahl let down the Army, period, several Republicans on the House subcommittee on terrorism, nonproliferation and trade made clear at a hearing Wednesday about the swap. But the Army seems to have let him down, too, as well as his fellow soldiers, by signing up someone who had been struggling to hold onto his equilibrium long before he deployed. “I’m so tired of the blackness,’’ he wrote in his journal, “but what will happen to me without it. Bloody hell why do I keep thinking of this over and over.”

Another, less universally debated tragedy set in Afghanistan, about another dreamer in wartime, is the basis of the new opera “An American Soldier,’’ by composer Huang Ruo, with a libretto by David Henry Hwang. It tells the story of 19-year-old Pvt. Danny Chen, an only child of Chinese immigrants who grew up in New York’s Chinatown and couldn’t wait to prove his patriotism and American identity by enlisting.

Trevor Scheunemann as Sgt. Marcum and Andrew Stenson as Danny Chen in “An American Soldier.” (Photo Scott Suchman)

Like Bergdahl, who saw himself as some kind of a latter-day medieval knight, Chen wanted more than anything to be a military hero. But instead, he killed himself in October 2011, after two months in Kandahar province, where eight of his fellow soldiers were later charged with physically abusing him on a daily basis. They kicked and beat him, called him “dragon lady,’’ “squint eye’’ and “egg roll.” On the day he died, he was forced to crawl almost the length of a football field over gravel while his fellow soldiers threw rocks at him.

In a joint interview before a performance of the Washington National Opera’s “An American Soldier,’’ which had its world premiere at the Kennedy Center’s Terrace Theater last weekend, Ruo and Hwang said they had wanted to tell a contemporary story — but had no idea just how contemporary it would be, opening on the same weekend that Bergdahl returned to the United States.

“There is an interesting counterpoint here,’’ said Hwang, who based his libretto in part on transcripts from the courts-martial of Chen’s fellow soldiers, who he said “all got off with a slap on the wrist.’’ The four whose cases went to trial served 30 days, 45 days, six months and 10 months.

That counterpoint “has to do with how we regard the military” in a country in which such a small percentage of us serve. “So yeah, there’s racial hazing, but how can we judge? And yeah, there’s sexual assault, but how can we judge? But then with Bergdahl, we do judge.”

The audience for the hour-long work was far younger than usual at the opera — in fact, an infant let out a wail as the lights went down. Many in the crowd had taken the bus down from New York, including some Vietnam vets who said they’d experienced milder versions of the racism Chen had endured. “My wife always tells me to forget about it,’’ said one of them, Thomas Lee, who served in Vietnam in 1965 and 1966. “That’s easy to say.”

Danny’s parents were there, too, but left during an emotional scene in which soldiers stone their son, hounding him to his death. So they missed the last scene, in which his mother holds his ghost’s hand to her cheek as she sings a lullaby from his childhood. Soldiers carefully fold the flag draped over his coffin and hand it to Danny, and he in turn hands it to his mother and salutes.

Danny’s cousin and closest friend, 20-year-old Banny Chen, was in the audience, and described him as “a teenage boy from New York City who grew up like everybody, playing video games and playing handball. He was the comedian’’ in the family, and some of his motivation in joining the Army “was every guy growing up, we always want to physically express ourselves.”

The hardest thing about the loss, he said, is that “his death was caused by his own ‘battle buddies,’ as he would call them, and not by anything foreign.”

At a Q&A after the performance, over the noise of the set being pulled down, a lawyer who said he had represented one of the soldiers accused of harassing Chen took exception to certain characterizations.

“Danny Chen was definitely hazed and he suffered terribly,’’ said the lawyer, Haytham Faraj. But Chen hadn’t been stoned so much as pelted with gravel, he said, rather than with the “baseball-size rocks’’ shown in the opera, “as if bombs were falling on him.”

He was shouted down by others in the audience, though. “There’s no place for legalism in the theater!’’ one man yelled at Faraj, and he left.

A soldier in uniform in the audience, who had been the first to rise to his feet to applaud at the end of “An American Soldier” told the creators and actors that in his mind, Danny Chen was not just an American soldier but an American hero, too.

In an interview afterward, the Army captain, Steve Scuba, a nurse who has served in Iraq and Afghanistan and is stationed at Fort Hood in Texas, said he’d been thinking about Bergdahl on his way to the Kennedy Center.

“Most people don’t know who Danny Chen is,’’ Scuba said, and one of the worst things about the Bowe Bergdahl story, in his view, is that after five years in captivity, “there’s such a disconnect’’ between the civilian and military worlds in our country that “the American public is just finding out about him and his family.” We weren’t there to pray for him, in other words, but are very interested now that he’s disappointed us.