Mike Foltynewicz pitched like a potential future ace and the Braves staged an improbable eighth-inning rally to come back from a three-run deficit Sunday. And still, it wasn’t enough to end the misery.

Chris Herrmann’s second homer of the game was an 11th-inning, two-run shot off reliever Jim Johnson that lifted the Diamondbacks to a 5-3 win and series sweep against the Braves, who fell to 7-23 and — gulp — 1-15 at home.

Herrmann’s homers off Johnson and Foltynewicz came on 0-2 counts, the first player since Lance Berkman in 2000 to homer twice on 0-2 pitches in the same game.

“I think after the way we came back today, anybody wonders how we’re playing for (manager) Fredi (Gonzalez) or anything like that — we’re still working and playing our asses off,” said Jeff Francoeur, who had a game-tying two-run double in the Braves’ three-run eighth.

The Braves have a 10-game home losing streak and are the first team in more than a century to lose 15 of their first 16 home games, since the 1913 New York Yankees posted 17 losses and a tie in their first 18.

They’ve lost 14 of their past 17 overall, and their record is the worst through 30 games in the 140-year history of the Braves franchise.

“We fight, we battled, now we’ve got to get some breaks, put the ball in play,” said Gonzalez, who’s been at the center of rampant rumors about his job status. “We did that, it wasn’t like we punched out and walked back to the dugout. We did that and you lose today’s game after tying it, and you sit in the dugout and see guys’ faces. They’re wearing it. They’re showing the losses are tough.

“It’s not only me and the coaching staff, everybody’s wearing it. I was hoping to get a walk-off win just to get momentum going, get that stuff rolling. But they made some pitches when they had to.”

During a stretch of 11 consecutive batters retired by Foltynewicz, Braves broadcaster and Hall of Fame pitcher Don Sutton said on-air, “Folty is flat-out dealing.”

That he was. The big redhead pitched as the Braves hope he on a regular basis someday soon, working six dominant innings before giving up a seventh-inning home run and leaving with a 2-0 deficit against the Diamondbacks, who added a run in the eighth against reliever Alexi Ogando.

Just when it looked like the Braves had wasted another strong showing from a young starter, the offense awakened with a three-run eighth inning featuring an RBI single from Tyler Flowers and Francoeur’s double off right-hander Jake Barrett, on a six-pitch at-bat in which he fouled off a pair of two-strike 95-96 mph fastballs before hitting a slider.

Flowers and Francoeur also left bases loaded, Flowers on a pop-out to end the third inning and Francoeur on a one-hop flare to the shortstop to end the ninth. The Braves are a National League-worst 4-for-26 (.154) with bases loaded.

The only thing that’s made the brutal start even slightly tolerable is the fact that the rebuilding Braves have reason to believe the future is bright. Foltynewicz could be a big part of that, if the power-armed Texan pitches as he did Sunday.

After giving up eight hits, four runs and three homers in 3 2/3 innings of his season debut Monday against the Mets, Foltynewicz limited the Diamondbacks to five hits and two runs in seven innings, with eight strikeouts and no walks.

“Everything was just flowing well today,” Foltynewicz said. “I took my time between pitches. That really helped me out a lot instead of getting up there and chucking every 10 seconds. When I felt myself rushing I just took a step back and I think that helped me a lot today.”

One run charged to him could’ve been avoided if not for a defensive gaffe by shortstop Erick Aybar on a bobbled ground ball, which turned a would-be inning-ending double play into a fielder’s choice in the fifth inning, before the Diamondbacks scored on a triple by pitcher Patrick Corbin.

Left-hander Corbin had a 7.41 ERA in his past three starts before Sunday, but did what he’s always done against the Braves: Held them scoreless. He allowed five hits, one walk and five strikeouts in seven innings, maintaining his 0.00 ERA in four career games (three starts) against the Braves.

The Braves began Sunday with a .206 average against lefties that was tied for worst in the majors, and a puny .253 slugging percentage against lefties that was 83 points below the next-worst in the NL.

Herrmann pushed the lead to 2-0 in the seventh when he homered on an 0-2 fastball from Foltynewicz, 96 mph and over the middle. After getting ahead with a curveball and a change-up, Flowers was set up for a high fastball. But Foltynewicz didn’t throw it high enough, obvious from the pitcher’s reaction the moment the ball left his hand.