Marcus Foligno had gone 20 games without a goal and had only one all season. At home? Not a single one.

So he unleashed a lot of frustration with a two-goal game in Tuesday’s 3-1 win over the New York Rangers. When he tied the game at 5:35 of the second period, Foligno thrust his arms into the air and did a full body leap into the end glass.

“It was huge,” Foligno said. “It was the first goal of the season in front of the fans and it was overdue. This is a game I needed to capture.”

Foligno had not scored since Jan. 27 in Washington, the fifth game of the season. He had energy right from the start of the game with several hits and helped bottle the Rangers in their own end shortly after New York had taken the league on Derek Stepan’s short-handed goal.

“It was one of those shifts I was getting on the body and everyone was around the puck,” Foligno said. “We beat them to pucks and they were a little bit tired.”

Foligno capped the shift with a neat between-the-legs flip for his goal, beating defenseman Ryan McDonagh to the spot and goaltender Henrik Lundqvist to the post while taking Christian Ehrhoff’s errant shot off the back boards. He even joked it was patterned after the kind of move Thomas Vanek would make.

“It looked a little nicer than I thought it was,” Foligno said. “My stick just got caught between my legs and I put it in. ... It’s just something you try in practice and maybe you get a time in the game and I was able to do it in that moment. My skate was in the way and the only way to get it to the front of the net was through my legs and you had to be quick too.”

Foligno’s second goal, at 11:48 of the third period, came when he banged home an Andrej Sekera rebound through Lundqvist’s legs after a neat pass from rookie Brian Flynn, who eschewed a shot and held the puck to feed Sekera at the right point. It was Flynn’s first NHL assist.