As Washington Capitals center Lars Eller came barreling down the ice with defenseman John Carlson on a two-on-one break in overtime, he saw San Jose Sharks goaltender Martin Jones slide over to cover the short side.

With the crowd at Capital One Arena buzzing, Eller gathered a pass from Carlson, aimed for the far side and zipped the puck past Jones for the game-winning tally and an improbable 5-4 ­victory Sunday afternoon.

Eller’s 10th goal of the season, at 2:01 of overtime, capped an incredible comeback by the NHL-leading Capitals (29-9-5), who scored twice in the final minute of regulation to tie it at 4. T.J. Oshie got the equalizer with 14.2 seconds left, just 32 seconds after Jakub Vrana scored his second goal of the game; both of the last-minute goals came with goaltender Braden Holtby on the bench for an extra attacker.

The Capitals became the seventh team in NHL history to win after overcoming a multigoal deficit in the final minute of regulation; the feat has occurred nine times overall, most recently by the Detroit Red Wings on Dec. 23, 2005.

“We know we can score goals,” Eller said. “Things weren’t ­coming easy for us, and we were struggling a little bit, but we always had a winning mentality, no-quit mentality.”

San Jose seemed to seal the game with an empty-netter by Logan Couture to make it 4-2 with a minute remaining, but Vrana, Oshie and Eller had other ideas.

“I think you have to be willing to still stay in it,” Capitals Coach Todd Reirden said. “A lot of teams, they won’t even bother pulling their goalie then. It’s a minute left, whatever; we just gave up an empty-netter. That’s not my philosophy or our philosophy as a team. We’ll take the goal against to never quit in a game.”

The Capitals prevailed despite a hat trick by San Jose’s Evander Kane, who tallied all three goals in a little more than 10 minutes of the second period. Kane’s third goal — and his second on the power play — gave the Sharks a 3-1 advantage, but Vrana answered less than two minutes later to keep Washington close.

The Capitals’ Evgeny Kuznetsov, who was a game-time decision because of an illness, nearly scored the equalizer on a breakaway in the waning moments of the period, but he lost the puck while trying to move it between his legs as he skated toward Jones.

“I would have preferred probably a different move — one that ends up with the goalie having to make a save,” Reirden said.

After neither team found the net for most of the third period, the late-game dramatics finally arrived.

Holtby, who made two stellar saves in overtime and was credited with the secondary assist on Eller’s goal, made 25 saves to improve to 18-7-4.

Entering Sunday, Holtby had given up 13 goals over his previous three starts — all regulation losses. That includes getting pulled from a 7-3 defeat at Boston on Dec. 23 after 20 minutes; he had given up four goals on the Bruins’ first 11 shots. Meanwhile, rookie backup Ilya Samsonov has won his past six starts, is 8-0-0 on the road and has a 11-2-1 record overall.

Whether Holtby saw it as such, Sunday’s matinee was a chance to reset.

“Key saves at key moments, especially in overtime where we actually didn’t make it very easy on ourselves,” Eller said. “We gave up some big opportunities. I know we’re better than that. Sometimes your goalie’s just got to come up with something ­extraordinary, and I think he did today.”

Even after the wild comeback, the Capitals’ issues with discipline continued. San Jose finished 2 for 4 on the power play; Washington has yielded two power-play goals in back-to-back games and in three of its past six.

The Capitals’ Richard Panik was called for high sticking, the first penalty of the game, at 5:13 of the second period, and the Sharks took advantage. Joe Thornton sent a slick feed to Kane, who beat Holtby from the slot at 6:25.

Washington responded 64 seconds later: The fourth line contributed a spark when Nic Dowd notched his fifth goal of the season. Brendan Leipsic and Garnet Hathaway had the assists; it was the ninth goal the trio have produced at five-on-five.

“They helped change that game, for certain. . . . They’re workers,” Reirden said. “They brought the rest of our team into the fight this afternoon.”

But Kane’s second and third goals put the momentum back in San Jose’s hands. After Hathaway drew a slashing penalty on Kane but Washington was unable to do anything on the power play, Kane exited the box and fired a wrister past Holtby’s blocker to give San Jose a 2-1 lead at 10:06. Then, after defenseman Radko Gudas was called for slashing, Kane completed his hat trick when he snapped a rebound off a shin pad and past Holtby at 16:49.

Vrana got the Capitals back in it before the period ended, giving him goals in back-to-back games following a 10-game drought. Oshie intercepted Sharks defenseman Marc-Edouard Vlasic’s pass behind the net, circled and made a nice cross-crease pass onto Vrana’s tape, and he made no mistake at 18:42.

That set up the third-period drama — and helped the Capitals complete a season sweep of San Jose.

“Today it just worked out in the end,” Eller said, “even though it wasn’t looking good for big parts of the game.”

More on the NHL from The Post: