Which generation Frontier do you have, 1st Generation (1999 - 2003) or 2nd Generation (2004 - present)?
We towed a similar weighted Rockwood Roo 3 Bed Hybrid with our 1st Generation Xterra. Same as Frontier, just a SUV - so a little heavier. Ours was a v6 4x4. The v6 was small, 3.3l with 170hp and 210 ft/lbs of torque. I added the largest B&M tranny cooler that would fit. The Xterra towed very well on flat ground, even with a 2" body lift and 2" suspension lift. On hills or tall bridges/over passes, we stayed with the big rigs doing 40 - 45 mph. I wouldn't even try climbing a real mountain. We couldn't run the A/C or the engine would start getting hot.
A 2nd Generation Frontier has a much bigger engine and could probably handle hills better, but you are pushing the limits of the tow capacity. From a handling stand point it will probably tow very well with a good weight distribution system with anti-sway integrated into the system, like the Equal-i-zer, which is what we used on our Xterra.
Getting back to the 1st generation, if you have one and it did not come from the factory with a tow hitch, you need to get a factory tow hitch or have someone custom fab the frame stiffeners that come with the factory tow hitch. The 1st generation Frontier/X have open C channel frames in the rear and without the frame stiffeners, you will bend the frame if you try to hitch up 5,000 lbs.