San Diego State (19-8, 8-5 MWC) won for the sixth time in the last seven games. New Mexico (15-13, 4-9 MWC) lost its fourth conference game at home for the first time since 1981.
New Mexico had a chance to win in regulation, but Chad Toppert missed on a 3-pointer with just over two seconds left. San Diego State couldn't control the rebound and the Lobos got the ball back with half a second left. Guard Darren Prentice found center Aaron Johnson open, but Johnson missed the easy layup.
Johnson gave New Mexico its last lead (74-72) with two free throws with 3:40 left in overtime.
Habel, who got his first career double-double with 18 points and 12 rebounds, scored inside, then intercepted a New Mexico pass and went in for another layup to make it 76-74.
New Mexico's Tony Danridge, who tied his career-high with 24 points, had his short jumper in the lane partially blocked and Heath countered with a 10-foot baseline jumper, his first field goal since the 11:45 mark of the second half.
Lobo guard Ryan Kersten had his shot deflected and Heath then added two free throws for a 78-74 lead with 1:21 left.
Heath, the all-time leading scorer in San Diego State and Mountain West Conference history, has scored in double figures in 52 straight games. He matched his season-high in scoring.
Aztec forward Lorenzo Wade scored 16 points, had 9 rebounds and a career-high 8 assists.
New Mexico led 33-24 with 2:22 left in the first half after a 12-2 run, but the Aztecs scored the final nine points. Wade scored seven of the nine, including a 3-pointer with 19 seconds left.
Heath found his shooting touch over a 2 1/2 minute early in the second half, during which he hit three 3-pointers, the last one giving the Aztecs a 47-41 lead with 15:58 left.
New Mexico steadily cut into the deficit and two free throws by Danridge tied it at 62 with 3:55 left in regulation. A 3-pointer by Richie Williams put the Aztecs up 69-65 with 2:10 left but Danridge got a short jumper to roll in with 37.7 seconds left to put the Lobos up 70-69.
San Diego State reserve forward Kyle Spain hit the first of two free throws with 17.1 seconds left for the final point in regulation.
Prentice scored 15 points for New Mexico and had 7 assists.