Phone doesn't respond to power button, stuck in reboot loop

Near the end of last week, I was using my phone (~50% battery according to the statusbar indicator) and it shut itself off. Poking the power button didn’t seem to help at all, plugging it in (with a known-good USB cable) didn’t seem to help matters: the tiny power indicator light on the front of the phone wouldn’t turn on at all.

After leaving it unplugged for several hours, plugging it in seemed to do useful things: the screen turned on, only to show the “battery charging” progress meter (now mostly full), but that was as far as things got, the power button was still unresponsive and even whether the phone would respond to being plugged in seemed somewhat sporadic.

I searched through the archives and found a case similar to mine; the suggested remedy was to poke the little yellow button hidden behind the bottom door on the phone. I did that when the phone was unplugged and nothing happened. I repeated the process with the phone plugged in and it vibrated three times and then turned on, only to show me the “battery charging” progress meter…and then turn itself and repeat the whole process.

What should I do now? Am I supposed to flash my phone or are there specific button-pushing incantations I need to try? If I am supposed to flash my phone, where can I get the appropriate builds from?

Thanks,
-Nathan