PHILADELPHIA — The scoresheet said the Rangers edged the Flyers, 3-2, in a shootout Saturday afternoon, but the win resonated on much deeper levels with the players.

Henrik Lundqvist said the comeback from a 1-0 deficit in the third period — without captain Ryan McDonagh, who left early with a possible concussion after a sucker punch from Flyers forward Wayne Simmonds — “shows ourselves what type of mentality you need to win games. You need to believe that you can go after a team and create chances rather than wait-and-see.”

Keith Yandle, who played a season-high 27:33 with McDonagh out and whose top-shelf rocket with 12.9 seconds left forged a 2-2 tie and forced overtime, said coming away with two points after facing the very real prospect of leaving with none “was huge . . . There were a lot of emotions in the locker room.”

After a game marred by questionable officiating, Derick Brassard simply said: “It wasn’t pretty. But when we’re desperate, we’re good.”

To be sure, it was an uphill climb for the Rangers to win consecutive games for only the second time since Nov. 25. After a scoreless first period that was punctuated by the McDonagh-Simmonds incident, coach Alain Vigneault said: “They totally dominated us in the second. If it wasn’t for Hank, it would have been over. In the third, it was our turn to dominate.”

advertisement | advertise on newsday

Lundqvist made 19 saves in the second period, allowing a lone goal on the Flyers’ third power play of the period when Shayne Gostisbehere’s sliding shot from the point snuck past a screen at 7:16. “We knew it was going to be a tough task to turn this around,’’ Lundqvist said, “but we had a good talk after the second.”

In the third, Chris Kreider’s tip of Mats Zuccarello’s shot at 3:16 tied it at 1. The Rangers continued to attack, but Zuccarello lost the puck in the neutral zone and Ryan White, off the rush, beat Lundqvist with a stoppable shot at 5:46 to restore the Flyers’ lead. With Lundqvist pulled for an extra attacker, Yandle’s blast from the point sent the teams into their third overtime at Wells Fargo Center this season.

“It was a good example of fighting until the last second,” J.T. Miller said. Actually, that was just the first step as the Rangers secured a point. The second step came in the shootout.

After the Flyers’ Sam Gagner shot wide, Zuccarello deked and beat Steve Mason in the first round. Lundqvist’s poke check denied Claude Giroux’s try and Derek Stepan ended it with a wrister, giving the Blueshirts their 29th win and 63 points, four points ahead of the Devils for second place in the Metropolitan Division.

The major concern was McDonagh. “He was held out for precautionary reasons and was being treated and evaluated,” said a team spokesman, who did not specify the nature of the injury.

At 10:36, McDonagh braced himself for Simmonds’ check near the Flyers’ bench by raising his stick, which caught the back of his helmet. Simmonds went right back at McDonagh, who delivered a slash. Simmonds responded with a gloved left to the right side of McDonagh’s jaw, which dropped him and left him face down as Kevin Klein grabbed Simmonds.

Simmonds was ejected and assessed a 10-minute match penalty for a deliberate injury and game misconduct. McDonagh, who was tended to by trainer Jim Ramsay, received four minutes for slashing and cross-checking.

“Ryan’s a big part of our team, but [the team had] to keep playing,” Vigneault said.

It took will and resolve, but that’s what the Rangers did.