Things were going smoothly for Zack Wheeler, who was dealing through the first four innings on Monday night, locked into a pitcher’s duel with Adam Wainwright.

In the fifth, the 27-year-old loaded the bases with three consecutive walks, but got himself out of the inning unscathed.

But the next frame wasn’t so kind, as the Cardinals were able to break into the scoring column with a two-run blast from Paul DeJong and hits from Kolten Wong and Wainwright to chase him from the game.

With his fifth consecutive loss, Wheeler dropped to 3-7 on the season in yet another frustrating start where the right-hander started strong but hit a figurative wall after about 60 pitches.

“My defense made really good plays today, and I should have capitalized on that,” Wheeler said. “It was my fault. I should’ve made my pitches and got out of that. Today we couldn’t get the job done when we needed to.”

Hansel Robles returned on Monday after spending six weeks at Triple-A Las Vegas and promptly surrendered a three-run home run to Tommy Pham to bust the game open and ultimately seal the win for St. Louis.

“You definitely can’t go on a run if you’re not going to get consistent pitching,” Collins said. “We think we can [pitch well], but you got to be able to.”

For Wheeler, it’s frustrating to see. If he could just get over that mental hurdle, he’d be able to relax and spread his results from the first five innings over a whole outing.

“I felt comfortable, I felt strong, I don’t know what happened in the fifth,” Wheeler said. “In the sixth, I tried to slow myself down a bit and  I slowed myself down too much.”

New York has lost two straight and is 10-8 in its last 18 games. The Mets are 21-26 at Citi Field in 2017. The homestand started on the right foot with two wins against the Rockies, but the last two games have been the problem with the Mets this season: One step forward, two steps backward.