Matt Hendricks beats Bruins goalie Tim Thomas in the shootout. (Elsa/Getty Images)

The Washington Capitals arrived at TD Garden on Thursday night knowing they couldn’t afford to leave with anything short of two points to keep their playoff hopes afloat. And in securing a victory over the defending Stanley Cup champion Boston Bruins, Washington took an adventurous route.

Forward Jason Chimera earned a game misconduct and starting goaltender Tomas Vokoun left with an injury, and that was all before Washington claimed a two-goal lead in the third period only to see it disappear in the final 3 minutes 10 seconds of regulation.

Despite Boston’s best attempt at derailing their plans, the Capitals pulled together for a 3-2 shootout win and all-important pair of points with goals in the tiebreaker by Matt Hendricks, Alexander Semin and Brooks Laich.

“This is the heat, everybody likes playing in the heat,” Coach Dale Hunter said. “Like I keep saying, that’s what it is in playoffs — team comes back late in a game, forces overtime and you never know what happens. You always say that team [that comes back] has momentum to win the game, but sometimes it doesn’t turn out that way.”

The victory allowed the Capitals (39-31-8) to keep pace with the Buffalo Sabres, who are even with Washington with 86 points but hold the eighth and final playoff spot in the Eastern Conference because they have a game in hand. Buffalo will host Pittsburgh on Friday.

“We’re back on track,” said winger Alex Ovechkin, who recorded two assists. “Right now the pressure is on Buffalo. We hope different teams are going to help us a little bit. Sometimes you don’t look at the standings, but right now you have to look at the standings and see what’s going on. We’re happy to take the two points and take a big step, I think.”

It wasn’t an easy step to take.

After 47 minutes of tight-checking, scoreless hockey, the Capitals broke through with a pair of goals 1:55 apart. Dennis Wideman created a 1-0 lead when his shot from the top of the right faceoff circle beat a screened Tim Thomas (21 saves). Marcus Johansson upped the advantage on a one-timer of a cross-ice pass from Ovechkin at 9:54.

The Bruins, who could have clinched a playoff berth with a win, weren’t about to fold with half the third period left to play. As quickly as the Capitals took the lead, Boston answered with goals by David Krejci and Andrew Ference — both tipped shots — in the span of 1:54.

“It’s a tough way to have a game sent to overtime,” said Hendricks, who would use his signature kick-start move to fake out Thomas for the opening shootout goal. “But we’ve been there, we’ve been through it this year and we’ve got some good leaders in here who stand up on the bench and say what we need to hear and say, ‘Just keep the course boys, we’ve got to battle now. We’ve got to get this point.’ ”

The Capitals’ hurdles began long before the finish, though. Washington found itself at an early disadvantage when Chimera received a five-minute major penalty for charging and a game misconduct with 14 minutes gone in the first period for a check that sent Adam McQuaid headfirst into the end boards.

Replays showed McQuaid, who did not return to the contest and has a history of concussions, turning toward the glass immediately prior to Chimera making contact.

Then, with 1:35 remaining in the first period, Vokoun (seven saves) removed himself from the game after suffering an apparent injury. It’s likely Vokoun aggravated the groin muscle strain that forced him to miss the previous six games. Michal Neuvirth came in off the bench and finished with 19 saves, along with stopping two of four Bruins’ shooters in the shootout.

It might not have been the easiest way to gain two points in this race to the finish, but at this stage of the regular season it’s the result, not the method, that matters most.

“I thought we played a really good game,” said Laich, who scored the decisive shootout goal. “We faced as much adversity as a team probably can in a game: a five-minute penalty kill in the first period, we lose our starting goalie, we give up a two-goal lead and we still pull out with a win. I’m proud of our guys. I’m really proud of them.”

Capitals notes: Nicklas Backstrom, who has missed 40 games with a concussion, skated for the 16th time in the past 17 days. . . . Joel Ward, Jeff Halpern and Jeff Schultz were healthy scratches.