The Senators got their season-high fourth straight win and reached .500 for the first time since Oct. 28. It was Heatley's second hat trick of the year and he had an assist for a season-high four points. His last three-goal game was Oct. 26 at Toronto.
Dean McAmmond and Mike Fisher added goals for the Senators. Ray Emery had 33 saves.
Gary Roberts scored two goals for the Panthers, while Stephen Weiss and Drew Larman also scored. It was Larman's first career NHL goal in two games. Ed Belfour stopped 26 shots.
Heatley scored at 19:00 of the third and Spezza's goal came at 7:48.
Florida had reclaimed the lead at 3:29 of the third period on Roberts' second power-play goal when he deflected a shot from Ruslan Salei into the net. Less than three minutes later Fisher redirected a pass from Patrick Eaves past Belfour to tie it 4-4.
Florida had tied it 3-3 near the end of the second period on a power-play goal by Roberts. Ville Peltonen passed from the left circle to Roberts just outside the crease. Roberts redirected the puck in at 19:33.
Larman's goal pulled the Panthers to 3-2. Emery blocked a shot by Steve Montador, but Larman picked up the rebound and pushed in the puck at 13:10.
Ottawa stretched its lead to 3-1 at 4:49 of the second. McAmmond shot from the left circle and the puck went over Belfour's right shoulder.
The Senators took a 2-1 lead during a power play at 11:22 of the first period. Spezza's shot bounced of Belfour and Heatley shot it in from the right side.
The Panthers took a 1-0 lead on Weiss's goal at 7:09. After his initial shot was blocked, Weiss fell right of the crease but was able to reach back and slide in the puck from behind the net.
Just 44 seconds later, the Senators tied it on Heatley's first goal. Chris Kelly shot the puck down the ice to the back boards. Belfour moved behind the net to retrieve the puck. Instead, it bounced back to Heatley and he slapped it into the open net.
Notes: The Panthers sent winger Greg Jacina back to AHL Rochester on Thursday and called up winger Larman. ... Florida's Mike Van Ryn was a late scratch due to the flu...