Capitals right wing Justin Williams has struggled to find the back of the net this season. (Nick Wass/Associated Press)

Justin Williams stood beside the bench, looked up at the video board and seemed to experience the stages of grief all within a few seconds. He had just knocked in a cross-ice feed from Evgeny Kuznetsov as the first-intermission buzzer sounded, the weight of one of the worst slumps of his career temporarily lifted.

But then video review showed that the goal was a tenth of a second late, the puck just short of crossing the goal line when the period expired. As his Capitals teammates started to retreat to the locker room, Williams pursed his lips, shook his head and looked stunned.

“You kind of laugh about it a little bit, then you swear a little bit,” Williams said. “I saw the puck go in the net, and then I heard the horn, so it doesn’t necessarily mean the clock is out. But I thought it was good for sure, but then to hear it wasn’t, you get the, ‘Come on.’ That’s the way it’s going. But I’m not going to b---- and whine and say woe is me.”

Thursday night’s game against the New York Islanders seemed to tell the story of Williams’s season: He’s continually had scoring chances without being rewarded with production. He had seven shots on goal, a season high, and five came in the first period, not including the goal that was wiped away. Nearly scoring doesn’t count.

A free agent addition two summers ago, Williams scored 22 goals with 30 assists last season, but he has just two goals and two assists in 22 games this season. Known as a calming presence, the veteran of 15-plus seasons refuses to overreact out of frustration, preferring to stay steadfast.

“I’m getting tested right now, and I know I’m going to pass because I’m not going to go away,” Williams said. “I’m going to keep doing the things I’ve done my whole career that have made me successful, and I’m going to continue to do those. I know that eventually they’ll work and they’ll pay off.”

Before practices this season, Williams has dragged a bucket of pucks with him to one end of the ice to spend some extra time on his shot. Perhaps misery loves company, so it’s usually young winger Andre Burakovsky, in a goal drought himself since scoring two in the first game of the season, who joins Williams on the ice before practice. Williams comes up with the drills, and Burakovsky follows his instruction.

“I know that he knows how to get there, how to be one of the best players in the world,” Burakovsky said. “He’s been there, so every day I listen to what he says, and if he tells me to go out on the ice with him, I do. That’s kind of how it started.”

Williams said that when he was younger, he learned from John LeClair in Philadelphia that some extra shooting can be beneficial, and seeing the puck go in the net and practicing shots from different angles has propelled Williams out of previous slumps. He’s tried to stay positive and hasn’t sensed any change in his shot or his skating. “I’m not looking for something that’s not there,” he said.

“I know I’m counted on this team to produce offensively, to be a good two-way player, to be a leader in the room, and when one of them isn’t where you want it to be, you can get frustrated,” Williams said. “I am frustrated. It’s been a tough stretch. But at the same time, I’m not going to let anything break me.”

Fourteen years separate the 21-year-old Burakovsky from the 35-year-old Williams, but their scoring struggles seem to be similar, an unfortunate lopsided ratio of chances to production. Burakovsky is fifth on the team with 30 shots at five-on-five. Williams has had 42 shots at five-on-five, second only to Alex Ovechkin, according to His shooting percentage at five-on-five is down to 2.38, his lowest such mark since the 2008-09 season. He shot 8.70 percent last year.

“I just try to stay positive,” Coach Barry Trotz said of working with Williams. “He’s a really good pro. He gets it figured out. I can’t say that Justin’s not working. I can’t say that he’s not getting chances. I can’t say a lot of things about Justin’s play. The only thing I can really say is Justin hasn’t gotten the production that he usually gets.

“He’s just got to keep doing the things that [have] made him very successful for all of these years and play with that determination, play with that energy. Play with that knowledge and that competitive edge that he has, and he’ll find the back of the net.”