– The Wild snapped out of its scoring funk to build a lead against the Golden Knights on Friday night in Las Vegas, and yet coach Bruce Boudreau started to feel glum.

That’s because the Avalanche was up 2-0 on the Coyotes, a matchup the bench boss was monitoring since it pitted the two teams the Wild is chasing for a playoff spot against each other.

“Then it’s 2-2, and you’re going, ‘OK,’ ” Boudreau said. “You see 44 shots. It looks like Arizona is taking the play to them, and then you see it’s 3-2.”

Despite rallying to pull even with Colorado, Arizona fell in a shootout — a less-than ideal situation for the Wild since three points, instead of only two, were doled out. And after battling inconsistency issues for months, the Wild is in a position where it needs others to stand still for it to have a hope of catching up.

But the group will take back some control of its fate Sunday after that crucial 3-2 win over Vegas.

The team will wrap up this two-stop road trip by going head-to-head with the Coyotes at Gila River Arena, a game that likely will decide which squad’s pursuit of the postseason continues and whose bid falls short.

“Our next game is probably going to be the toughest game of the year,” Boudreau said, “because I think whoever loses is probably for sure out.”

Neither the Wild nor Arizona can be mathematically eliminated from contention Sunday, but not securing two points would be a major blow to each club’s chances on the brink of the final week of the regular season.

With 81 points, the Wild is four back of the Avalanche for the second wild-card seed in the Western Conference and only one behind the Coyotes. A win in any fashion by the Wild on Sunday would leapfrog it over Arizona and put it only two points shy of Colorado with three games to go.

While the remainder of the Wild’s schedule is challenging, with Winnipeg, Boston and Dallas on deck, there are reasons for optimism. The team is 4-0 against the Jets this season and after hosting them and the Bruins, the Wild closes out the regular season against the Stars on the road, where it has achieved the bulk of its success.

After dispatching the Golden Knights, the Wild improved to 10-4-2 in its past 16 away games. Since Dec. 29, the team is tied for first in the NHL in road wins (14) and tied for second in road points (30).

Devan Dubnyk has been in goal for all 14 of those victories, posting a .920 save percentage and 2.39 goals-against average. His 19 road wins are tops in the league.

Still, the Wild has only a measly 4.9 percent chance of making the playoffs, according to sportsclubstats.com, while the Coyotes are at 15 percent and Avalanche 79.4 percent.

Colorado is back in action Monday against St. Louis and then faces Edmonton, Winnipeg and San Jose. The most points it can end up with is 93, while the Wild can max out at 89. So the Wild’s tragic number, the combination of points it loses and the Avalanche gains, is five.

As such, the Wild’s outlook is unmistakably bleak — its first playoff absence in seven years seemingly lurking.

And while other factors are at play, the Wild has a leading role in how it finishes. It always did.

“The math and all that stuff doesn’t really matter if we don’t win,” winger Jason Zucker said. “That’s what makes it easy. We can focus on anything we want. But in the end, if we don’t win, none of that matters. So we have to win. That’s all we have to worry about.”