I'm not sure why it ate however it is rare for a common bread and butter fish to starve themselves to death. I'd figure it was an one off thing or there's something I don't know about the scenario but that's not the topic at hand.
There aren't many fish that can be considered aggressive and small enough to live in a 10 gallon. If I were you I'd settle for something peaceful.
Sparkling gouramis, cherry shrimp, and a school of ember tetras or chili rasboras could work. Though not aggressive, if the gouramis pair up, you would see them fighting off territory.
Dwarf pea puffers are a good interesting option for a 10 gallon. You could have a few of them, they do better in species only tank because they can be nippy to other small fish. But if tankmates are to be considered, must be nothing that could eat the puffers, which stay tiny.
I would do plants and shrimp if it were me. Maybe endlers. If you want a small predator, the scarlet badis is a really cool fish, but would eat shrimp and other baby fish.