Six weeks ago, the way this stumbling, bumbling season was heading, even the least cynical and most optimistic fan never could have imagined the Wild would be able to put itself back in the playoff picture.

The Wild’s game was a wreck. Its goaltending was in shambles, its confidence was shattered and in pieces.

Well, 40 days after suffering a rock-bottom six-goal loss at Pittsburgh, the Wild has indeed climbed back into the top eight for the first time since Nov. 24, thanks to a 6-2 victory Sunday night over the Dallas Stars.

For the first time since the Wild’s torrid 11-1-1 post-All-Star break run began, there was no reason to scoreboard watch. The Wild needed no losing from others. A victory was all it would take to climb inside that playoff bubble.

So, of course, the Stars led 1-0 after two periods. So, naturally, the Wild scored a franchise-record six goals in the third.

“We just believed in here if we went out and played the way we were capable of, we could take over the game,” goalie Devan Dubnyk said before letting out a loud snicker. “You never expect to put up six in a period, I don’t think.”

Perhaps, players recalled that Jan. 15 in Buffalo, when Dubnyk debuted with the first of five shutouts so far, it was Jhonas Enroth in net. The Wild put up seven on Enroth for its most lopsided victory in history. Two months before that, Enroth gave up five during a 6-3 Sabres loss in Minnesota.

The 5-10 Enroth is now on the Stars, and he stopped 20 of 20 shots through two. The Wild attacked in the third, outshot Dallas 15-5 and the Enroth the Wild has grown to know and love revealed himself.

Zach Parise tied the score 1:40 in. Mikko Koivu made it 2-1 just 1:43 later and, as Parise said, “We got a jolt of energy. They just kept coming after that.”

Stephane Veilleux scored next for his fifth career winning goal. Mikael Granlund set up rookie Matt Dumba on a power play, then Granlund followed with a breakaway goal a minute later. Parise capped the night with his 25th goal.

Granlund had three points and rookie Christian Folin registered his first career multi-point game. His first assist was a backhanded, cross-crease pass from the left-wing boards that Parise called “right on the money” for the tying goal.

Don’t act so surprised, Folin said. “I have some skill, too.”

Jason Spezza scored twice, including the first power-play goal against the Wild since Jan. 20. The goal ended a 32-for-32 streak. But coach Mike Yeo asked the Wild to invest in the game early, get pucks deep and make the Stars’ defensemen retrieve pucks over and over so the team would tire. After all, Dallas played the night before at home.

Yeo felt that game plan paid dividends in the third.

The Wild, which has won six consecutive at home and is 13-2-2 since the Dubnyk trade, hopped San Jose and Calgary into eighth. Minnesota is two points back of Winnipeg with two games in hand and even within striking distance of slumping Chicago. The top three in each division gets a playoff berth, and the Wild is six back of the Blackhawks with a game in hand.

“It’s nice to get in there, it’s nice to make a little movement in the standings for us,” Parise said. “It felt like the longest time we were winning and weren’t going anywhere. It’s a long ways to go, but you have to get in some time and somehow, and it’s nice to get back in.”

Still, what has made the Wild so good the past six weeks is the urgency it’s playing with and its preparation, Yeo said.

The top-eight inclusion could be temporary the way the West jockeys for position nightly, so with 23 games left, Yeo said, “There’s a lot of work to be done. Yesterday we were outside the top eight, and I don’t think that it meant anything and tonight we’re inside the top-8, and I don’t think it means anything.

“We’ve got ourselves back in the hunt and now we’ve got to take advantage of it.”