Patrick Corbin delivers eight strong innings as the Nationals beat the Mets, 5-1. (Katherine Frey/The Washington Post)

Leave it to Patrick Corbin, who cruised through the New York Mets on Wednesday, who has now made a habit of staring down the Washington Nationals’ problems and making them disappear — at least for three or so hours at a time.

That may not last. Corbin now sits four games before pitching again. The Nationals have been allergic to any kind of consistency this season. But the lefty starter paced his team to a 5-1 win over the Mets at Nationals Park and, as a result, Washington is in position to take its first series since mid-April with a win Thursday.

The Nationals are still 17-25, underachieving in so many ways, but they are 5-0 when Corbin appears after a loss. He gave up one run in eight innings and has a 4-1 record with a 2.91 ERA. He picked the Mets apart with 11 strikeouts, nine of them on his feared slider, and Washington’s offense was all too much for Wilmer Font.

Victor Robles, Anthony Rendon and Howie Kendrick combined to go 7 for 12 with a home run, three doubles, four runs scored and four RBI. Corbin’s strong effort, and theirs at the plate, is the sort of winning formula that has often escaped Washington through the first quarter of the season. But sometimes everything clicks.

“We’ve been doing a little bit of everything but at different times,” Kendrick said. “And now tonight that’s what happens when it all comes together.”

This was, after all, always a game the Nationals could win. It was fair to wake up Wednesday feeling that way, even if it also seemed as if the season has already spiraled out of control. Washington’s confidence could rest in Corbin, in the rhythm of his smooth delivery, in his high strikeout rate and the way he has pitched for most of this year. And it could rest facing Font, a fringe major leaguer, a 28-year-old with just six career starts.

But these Nationals don’t get the benefit of logic or favorable matchups or what statistics may project. They haven’t played well enough for that — at least not in the 41 games before this one — and so any confidence was joined by the possibility of, well, anything.

Then Corbin came out firing, and Washington fell in line behind him.

“You always want to be that guy to take the ball and go out there and compete,” Corbin said. “Just try to put up as many zeros as I can, keep us in the game.”

Corbin struck out the side in the first. Each at-bat ended with an 83-mph slider — one middle-away, the next in a similar spot, then in the dirt to retire Robinson Cano — and the Nationals jumped on Font with three runs in the first.

It was the second time in six days that Washington gave Corbin an early three-run lead with which to work. This past Thursday, on the road against the Los Angeles Dodgers, the Nationals scored three first-inning runs and Corbin responded with seven scoreless frames in a win. On Wednesday, with the same immediate support, he found a rhythm, lost it momentarily, then recovered to dominate by throwing 43 sliders to 33 four-seam fastballs, 24 sinkers, five curves and three change-ups.

“I sit around often and on the computer I can just kind of visualize standing up there as a hitter, and the break is so late,” Manager Dave Martinez said of Corbin’s slider. “That’s what makes it so effective. Looks like a fastball coming in. It just drops.”

Corbin stumbled in the third inning because his command waned, and, after he walked Jeff McNeil, J.D. Davis smacked an RBI double off the left field fence. But Corbin soon escaped the jam, and his teammates were quick to restore the advantage.

Robles started the third with a solo home run, his second in as many days, eighth on the year and fourth against the Mets. Rendon followed with a double and, like clockwork, Kendrick doubled him in to boost the lead to four runs. The three of them have been bright spots for an undermanned, underachieving offense. Wednesday was no different, and Corbin took it from there.

The 29-year-old began the fourth with back-to-back strikeouts, ended the fifth with one, started the sixth with two more and, in his eighth and final inning, got Juan Lagares and Todd Frazier to wave at bouncing sliders before retiring to the dugout.

And when Corbin jogged in shortly after, once he threw his 108th pitch and put one last zero on the board, it was to a loud ovation in the place of season-long despair.

“It’s great for tonight,” Kendrick said. “But we got to do it consistently.”