The Washington Capitals have been waiting for their breakthrough. They have repeatedly said they were not panicking over losses or overly concerned with a recent slump that exposed multiple shortcomings. Finally, on Sunday, a much-needed glimpse of their long-dormant identity emerged.

The team’s leaders were — and still are — confident in the Capitals’ core, pointing to their experience when asked how and why they will shake out of their recent funk. That experience was ­evident throughout Sunday’s 5-3 win over the Pittsburgh Penguins at Capital One Arena, and even if it was just for one game, the spark the Capitals had been searching for arrived at last.

“[There were] a few breakdowns that they were able to capitalize on, but for the most part I would say that was the most connected five-man game that we’ve played probably in all three zones in quite some time,” Capitals Coach Todd Reirden said. “There’s still mistakes, and we still have to get better in a number of areas, but this was a step in the right direction.”

With the score tied at 3 midway through the third period, the matinee yielded another classic ending. Washington winger T.J. ­Oshie again showcased his knack for late-game heroics, throwing a backhanded shot on net from the right side and then knocking in his own rebound for his 25th goal with 9:20 left.

It was Oshie’s sixth goal in eight games, and it held up as the game-winner. Carl Hagelin added an empty-net goal, his second tally of the game, with 46.7 seconds left.

The win didn’t come easily for the Capitals (38-18-6, 82 points), who entered the third period trailing 2-1. Pittsburgh (37-18-6, 80 points) was threatening to move two points clear atop the Metropolitan Division with a game in hand; instead, the ­Capitals are back on top.

“We needed a win,” Hagelin said. “I think it was a gutsy effort. Showed a lot of character there in the third. Hopefully we can get some momentum out of it.”

For the Capitals, the task now becomes stringing wins together. Even with Sunday’s much-needed victory, questions remain. While this performance was strides better than many offerings during its preceding 1-5-1 stretch, Washington still needs to show its desired identity for a full 60 minutes.

The Capitals’ once-red-hot sticks have cooled, their defense has been lacking, and they have struggled to remain tough around their net. The distraction that was Alex Ovechkin’s march to 700 goals has passed, and perhaps this is a chance to use the captain’s milestone as a springboard.

“The only way to work through it was to go out there and get it done,” forward Tom Wilson said. “It wasn’t an easy game. There were ups and downs. That’s a character win. It’s one win. We’re going to learn from it. It was great for the team, but we’ve got to keep going.”

Holding a 1-0 lead thanks to a first-period goal by Jakub ­Vrana, Washington found itself in trouble after the Penguins scored twice in 26 seconds during the second. Patric Hornqvist tied it at 14:47; at the front of the net, he knocked a rebound past Capitals goaltender Braden ­Holtby. Sidney Crosby gave the Penguins the lead at 15:13, scoring on the rush as Oshie knocked him down. Holtby made the initial save, but the puck hit Oshie and ended up in the net.

Wilson tied the score at 2 just 76 seconds into the third period. He beat Penguins goalie Matt Murray on a breakaway during four-on-four play; it was his 20th goal of the season and gave him a career-high 41 points. He’s two goals shy of matching his career-best total, set last year in 63 games.

About 2½ minutes later, Hagelin crashed hard to the net. Finding a rebound during a scramble in front, he put the puck past Murray. John Carlson had the secondary assist for his 475th career point, breaking Calle ­Johansson’s franchise record for points by a defenseman.

“It’s great,” Carlson said of the record. “I’ve been here awhile, so that obviously helps, and I’ve been here awhile during the stretch of the best players I think probably in the history of the franchise. So I think there is a lot of great factors for me, and I’m glad to be a part of it.”

Evgeni Malkin came right back for the Penguins, beating Holtby with 11:10 left after he put the puck through Carlson’s legs. That set the stage for Oshie’s winner less than two minutes later.

Glaring issues remain for the Capitals, but they took some steps in the right direction Sunday. For just the second time in their past nine games, the Capitals scored first. And they showed progress with their energy, physicality and intensity in the opening 10 minutes.

“We started a lot better . . . and that helps kind of ease through some rough spots here and there,” Carlson said.

Vrana had the opening goal, breaking his 11-game drought at 6:12 of the first period. The ­23-year-old turned on the jets after a defensive-zone faceoff. Pittsburgh defenseman Marcus Pettersson wasn’t prepared for that kind of speed; as Vrana shot from close range, Pettersson fell and went crashing into the net, with the puck bouncing off him and in. It was Vrana’s 24th goal of the season, tying last season’s career high. He also reached the 50-point mark for the first time.

In typical fashion for this rivalry, the bad blood started early. The intensity and physicality boiled over at the end of the first period, and it involved the newest member of the Capitals, defenseman Brenden Dillon. Coming to the defense of teammate Nic Dowd near the Capitals’ net, Dillon flew in as the horn sounded and took on Malkin.

With a linesman trying to keep them apart, both players eventually dropped their gloves, and Dillon landed multiple blows on Malkin. Both were assessed ­double minors for roughing.

“I like to play hard, especially against those top-end guys,” ­Dillon said. “Malkin’s a heck of a player. He plays a physical game, too, sometimes. With these ­rivalry-type games, tempers run high, and it was great.”

Read more on the NHL: