I just bought this heater for my 5.5 and its been working great for about a week now. Its 6" which is just about the smallest you'll be able to find.
The heater can be found here:
I suck at posting pics and web sites but anyway go to Drsfostersmith.com and look at heaters....Go to the Betta heater made specifically for that tank. Not too expensive either. Good luck.
Go to a Big Al's(there are some all across the Country), and they probably carry a little heater. Its about 2.5" Long. Just cut hole into the foam or put it beside the foam in the filter.