Ryder's goal with under three minutes left in regulation was the winner Saturday as the Canadiens blew a three-goal lead, but recovered to down the Buffalo Sabres 4-3 for their second straight win.
Montreal's victories over the first-place Sabres and the Southeast division-leading Atlanta Thrashers on Thursday heading into the break helped erase the memory of a stretch where the Canadiens lost eight of their previous 11 games.
"It was definitely a big two wins for us, with the way we were struggling we just wanted to get one win out of the last two," Ryder said. "We played well our last two games, we wanted to make sure we get back to basics and just try not to do too much. It's worked out well, we managed to get the two wins and I think the confidence is coming back."
Guillaume Latendresse, Saku Koivu and Francis Bouillon also scored for the Canadiens (27-17-5), who improved their record in January to 5-6-0 heading into this week's all-star break.
"It would have been very demoralizing to start the break (Sunday) after two more losses," Canadiens head coach Guy Carbonneau said. "I always say that if you want to find out if you're a good team you have to beat the best. Well Atlanta and Buffalo are two of the best teams in the NHL."
Daniel Briere had two and Derek Roy also scored for the first-place Sabres (33-12-4), who have won only two of their last six games. However, Briere chose to focus more on the standings than the team's current slide in making his first-half analysis.
"We can't look at it as if we're going into the all-star break coming off a loss," said Briere, one of three Sabres who will start in Wednesday's All-Star Game in Dallas. "We have to look at it like we've really positioned ourselves well and we're going into the break sitting comfortably in first place in the Eastern Conference."
The Canadiens improved to 3-1-2 on the season against Buffalo.
"I don't know what it is, but every time we play against them we play very well," Carbonneau said. "We match up well with them."
All-star Cristobal Huet made 24 saves for the Canadiens, while Martin Biron started in place of Sabres all-star netminder Ryan Miller and made 27 saves to lose his second straight start.
"Even though we started out well, then let them back in it, it bodes well for the rest of the season that were able to battle back and get another goal to win it," Huet said. "It's very encouraging."
Both teams have probably been looking forward to the all-star break for a little, while with exhausting schedules of late. Saturday's game was Buffalo's seventh in the last 11 nights, and it was Montreal's fourth in the last six nights.
"Right off the bat you could tell they had more jump, we just had to weather the storm," Briere said. "But we never quit and managed to come back in the second half."
With the Canadiens ahead 3-2 near the midway point of the third, Briere struck with his second of the game and 18th of the season on a nifty give-and-go play with Brian Campbell to tie it up at 8:37 and complete a three-goal comeback for the Sabres.
After the Sabres killed off a late power play, Montreal's Ryder struck at 17:07 of the third to give the Canadiens the win. Alexander Perezhogin flew down the left wing and slid a pass across to a streaking Ryder, who made no mistake for his 15th of the season, sending the sellout Bell Centre crowd of 21,273 into a frenzy.
"It was good to come out with a win, especially when we were up like that," Ryder said. "It seemed like every mistake we made, they capitalized on it."
Montreal took advantage of two lucky bounces off the end boards to score two first period power play goals.
A Tomas Plekanec dump-in drew Biron out of his net, but the puck took a funny bounce out in front to Latendresse who tapped it into the empty net for the rookie's 10th at 8:00 of the first.
The Canadiens went up 2-0 at 19:30 of the first when Andrei Markov's shot bounced off the end boards to Alexei Kovalev, who found Koivu in front for his 16th of the year.
Montreal pushed the lead to 3-0 on Bouillon's second of the year at 4:49 of the second, but Buffalo scored two before the second intermission to cut the Canadiens lead to one.
Briere was left wide open for an easy goal at 9:04 of the second after Latendresse collided with defenceman Mike Komisarek in the Canadiens zone.
Roy made it 3-2 with his ninth of the year at 16:11 when his shot went in off Montreal defenceman Craig Rivet's skate.
Notes: Sabres D Henrik Tallinder missed his ninth game with a sprained ankle, while winger Jochen Hecht missed his third game with a lower body injury....Montreal D Janne Niinimaa and wingers Garth Murray and Aaron Downey were healthy scratches....Wingers Jiri Novotny and Andrew Peters were healthy scratches for the Sabres....The game featured both Eastern Conference starters on defence in Wednesday's NHL All-Star Game, Buffalo's Brian Campbell and Montreal's Sheldon Souray.