Do not give your fish freeze dried food or flakes, they lead to bloating and constipation.
The best thing to feed your fish is pellets that are low in fillers. The forum recommends either Omega One Betta Buffet Pellets or New Life Spectrum Betta Formula, Small Fish Formula, All Purpose Formula (1mm or smaller). These pellets have a lot of protein and little fillers.
You can also feed frozen bloodworms or brine shrimp as a once a week treat.
If he is having trouble eating the pellets then you have to train him to eat them. Every time it is feeding time, offer him one pellet. If he doesn't eat it or spits it out then remove it and try at the next feeding time. Keep doing this and do not switch away from the pellets. Eventually he will learn they are food and eat them. Bettas can go weeks to a month without food so do not worry about starving him. You can also try soaking the pellets in garlic juice - just microwave a garlic clove until you see liquid.