Alex Ovechkin dekes Bruins defenseman Brandon Carlo during the Capitals’ 4-3 win over Boston on Thursday night. Ovechkin scored the game-winner in a shootout. (John McDonnell/The Washington Post)

Less than 24 hours earlier Alex Ovechkin had missed the net on a shootout attempt in New York, that errant puck sealing the Washington Capitals' loss to the Rangers. It was that miss that gave Coach Barry Trotz confidence in his star Thursday night against the Boston Bruins.

After Washington's first two shooters were unsuccessful, Trotz turned to Ovechkin. He skated toward Anton Khudobin and, with a flick of his wrist, neatly tucked the puck under the crossbar and into the netting.

"If he has a failure, he sort of says, 'I want to make up for it,' " Trotz said. "There was no doubt that thing was in. He delivered that with authority."

Goaltender Braden Holtby then made a save on Boston's next attempt, ending the game and snapping a three-game losing streak. Washington's bench could collectively breathe again after the team had rallied from an early two-goal deficit, rediscovering its offense in the 4-3 win over Boston. The Capitals now have won their past 12 meetings against the Bruins.

"Games like this are going to make me go bald and turn gray," Trotz said.

Washington fell into 2-0 deficit less than three minutes into the game but rallied back to enter the third period tied. T.J. Oshie then had a brutal turnover as he attempted to move the puck up the ice and clear it out of Washington's zone. The puck landed on David Backes's stick, and his shot grazed Holtby's glove before caroming into the net for a 3-2 Bruins lead 7:19 into the third period.

"Mentally, that's really tough for a group that's been battling all night to get back and get back," Trotz said. "And I just liked our response."

As Washington had gone two-plus games without scoring a goal, the team lamented how it had gotten "too fine," not challenging opposing goaltenders enough with traffic in front. About four minutes after the Bruins took the lead in the third period, the Capitals tied it once again. Tom Wilson and Brett Connolly crashed the net, and the puck pinballed off a skate before getting past Khudobin. The tally was credited to Connolly, formerly a Boston player, and Khudobin stayed down inside his net for several seconds, in apparent disbelief.

That was the second goal from Washington's third line with Wilson, Connolly and center Lars Eller. The Capitals were four minutes from matching their longest goal drought in 28 years — 181 minutes 15 seconds, according to the Elias Sports Bureau — when Eller spun and whacked a puck over Khudobin. That was Washington's first goal since the third period against the Arizona Coyotes on Dec. 22, a drought of more than 177 minutes. It was Eller's first goal in 17 games, and it was exactly what was needed for the Capitals.

"I think we just kind of needed that one goal to get that spark," Eller said. "I think it was just a matter of getting that first one and then we were kind of rolling."

On the next shift, rookie Jakub Vrana raced to the net, drawing a slashing penalty. Washington's power play was 1-for-22 over the previous nine games. The Capitals' first-period man-advantage had four shots on goal, and on their second opportunity, Ovechkin unfurled his signature one-timer from the left faceoff circle, beating Khudobin as the puck smacked the water bottle at the apex of the netting. It was the team's first power-play goal in six games and Ovechkin's 24th tally of the season.

"It was very important for us on the power play to kind of bounce back because I don't think we have success in the last games," Ovechkin said. "It doesn't matter if I score or somebody else score, just to take the pressure off our shoulder."

For a Capitals team that had lost three straight before playing the Bruins, the first period was especially disheartening. Washington has typically responded well after losses, but it took less than two minutes for the Capitals to find themselves trailing. Evgeny Kuznetsov lost a battle behind the goal line, and Riley Nash passed the puck up to Backes, skating in to the net alone and scoring on the second shot of the game.

Less than a minute later, Noel Acciari skated around Washington defenseman Madison Bowey before knocking in his own rebound past Holtby. That gave the Bruins a 2-0 lead just 2:12 into the game. The Capitals seemed to ramp up the physicality after falling into the two-goal hole. A big Brooks Orpik open-ice hit sparked a fight between him and Kuraly.

The team later credited that as the spark it desperately needed.

"We didn't panic," Holtby said. "We realized we had a job to do, and the only way we were going to accomplish it is if we stuck to figuring out how to play our game. I think in the end, we did it."