Not all bonds are ionic bonds. While saying that "Carbon is 4+ valency and is a $\ce{C^{4+}}$ ion" works for carbides like $\ce{Be2C}$, it will not work for a covalent compound like $\ce{HCOOH}$.
Instead of ionic bonds, here we have covalent bonds. Whereas in an ionic bond one atom donates an electron to the other, in a covalent bond, two atoms each contribute some electrons and share them.
For example, with $\ce{O2}$, each atom shares two electrons with the other. Neither "give up" any electrons, they are just shared and contribute to the octets of both atoms:
The formate ($\ce{HCOO-}$) ion is like this:
The central carbon shares one electron with a hydrogen, and two electrons with an oxygen. It also shares one electron with a negatively charged oxygen. This completes the octets (or doublets in the case of hydrogen) of all four atoms.
With electrons drawn on:
Note that while the charges are not of the $1\times(\ce{C^{4+}}) + 2\times(\ce{O^{2-}}) + 1\times(\ce{H-})$ form, the oxidation numbers are.