For about five minutes, Washington Capitals winger Joel Ward sat almost motionless in his locker stall, still wearing his sweat-soaked hockey pants, staring blankly ahead.

So much must have been going through his head.

Two weeks ago, Ward was the toast of Washington. He scored the overtime winner in Game 7 against the Boston Bruins. On Monday night at Madison Square Garden, though, he watched from the penalty box as the New York Rangers knotted Game 5 with 6.6 seconds remaining in regulation and then snatched a 3-2 victory with another tally only 1 minute 35 seconds into overtime.

Ward was assessed a double-minor for high sticking Rangers forward Carl Hagelin at 19:38 of the third period.

“It’s a game of inches,” said Ward, who was waiting for reporters when the doors to the Capitals’ dressing room opened. “It happens pretty quick. We were a few seconds [away from] winning and it turned into an overtime and then a loss, just like that.”

Until the penalty, Ward had been enjoying another strong game. Although he did not record a shot on goal, he drew two penalties, including a hook on the Rangers’ Mike Rupp early in the third period. Capitals defenseman John Carlson scored on the ensuing power play for a 2-1 lead with 15:40 to play.

Washington was clinging to that one-goal margin when Ward lined up for a faceoff in the defensive zone with 21.3 seconds left. After the puck was dropped, Ward lifted his stick and struck Hagelin in the mouth as the two jockeyed for position. Hagelin was left bleeding from his lip.

“I was trying to get around his stick and got my stick under him,” Ward said. “And that was it.”

The Rangers wasted little time converting their opportunity. Around 15 seconds later, Brad Richards chipped a rebound off the post and into the net to knot the score and send the arena into a tizzy.

Ward, meantime, could only munch on his mouthpiece.

At the start of overtime, Ward was back in the box to serve the remaining 1:54 of the penalty. Marc Staal, however, ended the game before the Capitals could bail out Ward. The Rangers defenseman rifled a slap shot off of Brooks Laich’s stick and past goalie Braden Holtby.

Asked what was going through his mind as he watched helplessly from the penalty box as the seconds ticked off the clock, Ward paused to collect himself.

“Not much you can do really,” he said somberly. “You just hope you get another opportunity to redeem yourself. We just came up short. It definitely [stinks] to let the squad down.”

After addressing reporters, Ward continued to sit in his stall, staring, rubbing his face, then staring some more. He did not stand up until teammate Dennis Wideman walked over, whispered a few words of encouragement and patted him on the backside.

“It’s a little mentally disturbing for sure right now,” Ward said. “It’s tough to be in that position when you’re letting the team down.”

After the gut-wrenching defeat, which gave the Rangers a 3-2 series lead, the Capitals expressed their support for Ward.

“You can’t say it was his fault,” captain Alex Ovechkin said. “We all lost the game. We win as a group and lose as a group.”

Karl Alzner said bad breaks — and untimely penalties — are a part of the game. Sometimes you’re benefitting from an opponent’s miscue. Other times, you’re the goat.

“That’s the way with any sport,” Alzner said. “One time you do something great, the next time you don’t. It’s tough. A number of times, I’ve tipped pucks in our own net or done something stupid. I know a game where I had a goal and an assist in the first period and two goals against my own net in one period. There’s nothing you can do about it.”

Asked if Ward addressed the dressing room after the game, Alzner said he did not.

“There’s no need to,” Alzner said. “We all know. There’s nothing he needs to say.”