The Stars’ battle to stay in the final wildcard playoff spot in the Western Conference continues to get tougher, but then so do the Stars.

Dallas overcame the loss of forward Rich Peverley to a cardiac event Monday and came up with a huge 3-2 overtime win over St. Louis.

The Stars stay in the final wildcard playoff spot in the West, despite a hard charge from Phoenix. Dallas moves to 32-23-10 (74 points). Phoenix won to move to 73 points.

Dallas had a gritty game against the Blues, who have the best record in the NHL at 44-14-7, 95 points. The Stars got goals from depth scorers Colton Sceviour and Antoine Roussel, 28 saves from new goalie Tim Thomas in his first full game in net, and a rousing overtime winner from captain Jamie Benn.

It was an impressive finish to a challenging day.

“Obviously, last night was a scary situation, but you know today’s a new day,’’ Benn said of Peverley going to the hospital and the game being postponed. “We were thinking about Rich back home, but I thought we did a great job getting mentally ready for this game, and we’re still in a playoff hunt here. We’re still in a big playoff push and we found a way to get two points.”

Stars coach Lindy Ruff said he texted Peverley after the win, and Peverely texted back, “Keep rolling.’’

Thomas was called on in relief Saturday after Kari Lehtonen suffered a concussion. He saw Monday’s game stopped after Peverley collapsed on the bench six minutes in. So this was the first full game for Thomas since being acquired from Florida last Wednesday.