I'm sorry your baby is sick and I am happy that he's an important part of your family.
I'd guess your betta is constipated. The best remedy is thawing a frozen pea and cutting it into small pieces, then using a tweezer wiggle the piece at the surface to coax him to eat. What kind of food are you feeding? and how much/how often? Bettas are piggies and will happily over eat until they get constipated or develop swim bladder disease. They should only be feed small amounts morning and evening, then they should have one fasting day per week. The stomack of a betta is about the size of one of it's eyeballs, so that's not very big.
The other thing is about his half gallon "tank", I'm coming to believe that even though some folks have bettas in very small spaces and they survive, I'm not so sure they can ever thrive.
I would invest in no smaller than a 2.5 gallon tank (5 gals or even 10 gals is much better) and cycle the tank, then move your fishie into it. It must have a thermometer, mini heater (no more than 7.5 watts for a 2.5 - 5 gal tank) and adjustable filter. It needs to have a plant that either sticks up from the surface or a floating plant, a hiding place, and the filter needs to be set to the lowest setting. When you provide a more natural habitat for your betta, you'll be rewarded with be able to observe their natural behaviors and their personality really blooms. It's also much easier to keep them healthy with stable temperature, water chemistry, etc. Remember the "bettas live in puddles" idea is a myth! Their natural habitat is the marshy river tributaries of Thailand.
Good luck, and tell us how he's doing.