Nash assisted on Derek Stepan's tally 3:35 into the third period and then added his own marker less than 1 minute later for a 2-1 Rangers lead as the Sabres' Patrick Kaleta was serving a 5-minute major penalty.
But Buffalo, still down a man on the same penalty, tied it up when Nathan Gerbe notched a short-handed goal.
After a scoreless overtime, Nash went first in a shootout and scored on a backhander past the Sabres' Ryan Miller.
Lundqvist finished with 28 saves.
Drew Stafford found the net and Miller turned aside 26 shots for the Sabres, whose three-game winning streak was snapped.