I have a betta who was the same way. Picky, picky, picky. I spent money on every single thing out there and he'd turn up his nose or spit it out, same as yours. I finally did find the one thing he'd eat (those color-enhancing pellets). Even so, I have to give him one at a time; they absorb moisture and he'll spit out one that's been in the water for even two minutes. Fussy, fussy, fussy.
A few months ago he started on that not eating kick again. For almost a week he refused even his precious pellets. Now what? He's got to be eating something, right?
On close inspection I discovered what looked like mosquito larvae in some of the plants. And then I saw actual mosquitos on the glass above the water. My first instinct was to wipe them all out - how can mosquitos be a good thing? But a more experienced friend said "That's why he won't eat - he has something better, and it's alive".
There are actually people who breed mosquitos for aquarium use.
Lately he's at it again: not eating. And right now I don't see mosquitos or larvae. So where the heck is he getting food this time? Another close inspection revealed something new - bloodworms wiggling down in the substrate. I keep my tanks pretty clean so I was shocked at first. Then, after sitting and watching the tank for a solid half hour, I saw him do something that shocked me even more: he nosed some gravel aside and dived straight down to pluck up and gobble a bloodworm.
I've now also seen him leap out of the water to nab a mosquito. Nature in action. So I know that the days his feeding is off, he's finding nutrition elsewhere.
Check around your tank, both high and low. Is there anything wiggling, fluttering, drifting in the current? You're right, he is eating something to survive, so it's a matter of you watching with patience and "thinking like a fish". I'm guessing he still has his betta bump - that poochy part on the sides back near the tail. How big it is can tell you how much he's eaten lately. If it's big, he's definitely gorging on something. Let us know what you discover.