The Nationals’ Bryce Harper and Pedro Severino celebrate after both scored in the eighth inning on Wilmer Difo’s two-out single that tied the game. (Jim Mcisaac/Getty Images)

Baseball seasons are complicated emotional experiments, daring those who care about their outcomes to see dreams through reality, to absorb failure while still expecting to succeed, to balance long-term views with short-term objectives — and most of all, to know when to worry and when to trust that the sport’s invisible hand will pull everything back where it belongs in the end. Confidence does not come from perfection but from knowing that imperfection does not have to be fatal.

As the Washington Nationals beat the New York Mets, 8-6, in the most dramatic victory of their young season, with their biggest comeback to win since 2016, that invisible hand finally seemed to give the would-be World Series contenders a much-needed poke. For the first time all season, the Nationals looked like a group that could pick itself up. For the first time all season, they looked like a team ready to fight back.

When the Nationals began the eighth inning Monday night trailing the Mets 6-1, they sat in a confounding sort of purgatory. Some thought they were dead. Others thought they were doomed. They were more Bad News Bears than World Series contenders.

By the eighth inning Monday, one of their relievers had literally kicked a ball so far that a run could score. Another gave up a triple and a homer to the first batters he faced. The Nationals were on the verge of losing their fourth straight game to their division rivals, on the verge of plummeting to seven games back in the National League East.

Then, five runs down to a team that had lost just two games all season, they scored six. Their stunning eighth-inning rally included hits from Moises Sierra, Trea Turner and Pedro Severino, capped by a game-tying, two-run single from Wilmer Difo and a go-ahead, bases-loaded walk drawn by Michael A. Taylor. That stunning eighth-inning rally changed the entire feeling of their season — which, of course, is still just 17 games old.

“You never want to get too far in a hole,” Turner said. “Early in the season, it’s definitely overplayed sometimes . . . but you don’t want to get too far behind and have to play catch-up all year.”

Bryce Harper rounds the bases after his first-inning home run, his eighth of the season. (Jim Mcisaac/Getty Images)

By the eighth inning, they trailed by five, and Bryce Harper had driven in the only run — a broken-bat home run against Jacob deGrom. After the game, rumors swirled that the bat already had been broken when deGrom’s fastball severed it, but perhaps that makes the story more impressive. Harper still hit the ball 406 feet to right-center field.

“He started flexing when he came in,” Washington Manager Dave Martinez said. “I said, ‘Yeah, you’re strong.’ ”

But even Harper, herculean though he has looked lately, seemed unable to pull the Nationals out of their spring stupor.

He tried his best, driving in two runs with a bases-loaded single with one out in that eighth inning. But so many rallies have died when those behind him couldn’t continue them. This time, they continued the rally — “they” being a group of unlikely heroes cast into duty by injuries that have made comebacks necessary so often but so hard to stage. After Harper’s single, Ryan Zimmerman struck out looking. He is struggling, which is part of why so many rallies have sputtered early.

But this time, Severino followed with a two-out single. Matt Reynolds walked. The Mets brought in closer Jeurys Familia to face Difo. Difo, playing because Anthony Rendon is hurt and Howie Kendrick is already filling in for Daniel Murphy at second base, singled to tie the score. Moises Sierra, who started the inning with a single and was playing because Adam Eaton is on the disabled list and Brian Goodwin’s wrist is sore, got hit by a pitch to load the bases. Rallies such as that are not easy to stage and become more difficult when the lineup is missing three all-star-caliber players. The Nationals staged it anyway.

Then Familia walked another struggling regular, Taylor, to give the Nationals the go-ahead run. Mets relievers provided the Nationals with several breaks in that rally. Frankly, they were due for a few.

Earlier, Matt Grace had kicked deGrom’s safety squeeze foul. A.J. Cole’s first relief appearance consisted of two balls hit to the wall. All of that obscured 4⅔ strong innings from Jeremy Hellickson, who threw 88 pitches in his Nationals debut and gave up two runs — one of them because a flyball bounced off the glove of Matt Adams. Adams was playing left field because injuries have left Martinez needing as many good hitters in his lineup as possible and without the luxury of prioritizing defense.

But that eighth inning erased the miscues — both those made Monday night and those made in earlier games. The Nationals scored as many runs in that inning as they had in all but two games this season. Their eight runs tied for their second-largest output. That eighth inning took a team watching its dreams blur in the reality of a slow start, wrestling with failure but clawing for confidence, and put everything back in place — at least for the moment.

They were nearly three games under .500. Now they are one game under. They were nearly seven games back in the division. Now they are five games back with a chance to shave another game off the Mets’ overworked bullpen Tuesday night. They had failed but not succeeded, fostered doubts but never vanquished them. But Monday night, they battled back from the brink — which means they now know they can do it again.