yeah...his fins look like they may be clamped...i think thats an indication that hes too cold...also 2 pellets could potentially be not enough...maybe try 4? it really depends on the betta and what theyll eat without bloating. My Marbles eats 4-6 a day.
Also, while a half gallon is okay if you take SUPER good care of it, its highly recommended that you get at least 1 gallon, and optimal that you get 2.5 or higher. Mine is in a 1gal with a filter...hes okay and a happy little fish, but he looks cramped and I want to get him a 2.5. Larger tanks make them generally happier fish =)
EDIT: also if that is indeed a male (im no good at sexing)...he looks like a plakat, though he could still me delta i believe...two separate things.