Try your best to get a tank that is at least two gallons in size. Most quality heaters are designed to be used in containers that are two gallons or larger. If you're going to get a filter, try to get a tank that is around 3-5 gallons in size--filters don't do much good in tanks smaller than that because the ammonia builds up too quickly for the bacteria who live in the filter to break it down into nitrate, and the frequent cleanings would cause the colony to constantly fluctuate--leaving your fish vulnerable to ammonia and nitrite spikes.
When shopping for a heater, buy one that has an adjustable temperature dial. Cheap heater pads, pre-set heaters, and other non-adjustable heaters don't work on any thermostat, so they often overheat the water or don't heat it enough simply based on whatever the temperature of the air in your house is. Don't waste your money on them. Here is the 25 watt heater I use and recommend for small tanks: http://www.fosterandsmithaquatics.co...m?pcatid=11368
There are lots of cheap ways to keep your betta properly--if you cannot afford a lot of purchases right now, put all your money into getting the heater and instead of a tank, go to walmart or target and purchase a rubbermaid/sterilite plastic storage bin. These bins are very cheap (4 gallon bins are about $3), easy to clean, and safe to heat and keep fish in. Your fish can stay safe and warm in this container while you save up the money necessary to purchase the tank you really want.
If you can afford a tank kit now, I recommend the Marineland Eclipse 3 and 5, they are quite well priced and come with a power filter and a good fluorescent light for growing plants. You can also get the cheaper 3 or 5 gallon kritter keeper style tanks and a cheap sponge filter with an air pump.
Make sure you purchase a good dechlorinator at the store that removes chlorine, chloramine, and detoxifies ammonia. I recommend Seachem Prime because it is concentrated, so it will last longer and you'll get the most product for your money. As far as food, you should look for a high quality pellet brand like Omega One Betta Buffet Pellets, Atison's Betta Pellets, Ken's Betta Crumbles, and New Life Spectrum. You might want to google the ingredients lists for the pellet brands I've listed in case they're not available so that you will have an idea of what constitutes a quality pellet in case you have to shop based on ingredients. Frozen food is also a very good supplement to any betta's diet. There should be a small freezer section in the fish section of most pet stores--you should pick up some frozen blood worms or brine shrimp when possible, since variation is very important to betta nutrition. After all, one single pellet brand does not constitute complete nutrition. Remember to pre-soak any dry food you give to your betta in a little bit of tank water until it is rehydrated. This will prevent the food from expanding in the stomach later as it absorbs water in the fish's gut, which causes bloating, constipation, and other issues.
As for your current problems.. your fish may improve dramatically once he's in consistently clean water and has adequate heating. Many of the fish in the pet store are suffering from overfeeding, ammonia poisoning, and exposure to cold temperatures. Keeping his water clean is very
important, as long as you very slowly acclimate him to the new water, his stress should be minimal. When you get your heater, don't immediately set it to 80 degrees and plop it in. Set it close to room temperature and adjust it a degree every few hours so that the temperature of the tank warms up very slowly--if it heats up too quickly you may shock the fish. A container that small should be cleaned 100% every day. Here is a thread on how to change your fish's water safely in an uncycled container: http://www.bettafish.com/showthread.php?t=54400
Is there any way you could post a picture so we can tell whether or not he is bloated? Have you seen him pass feces yet? What did the feces look like? Sometimes abnormal feces can be a sign of internal parasites.