How can I fix a flattened gear?
The material deformation you are seeing is called ‘plasticity’.  It happens when a material under stress is deformed and doesn’t return to its original shape (this would be called elasticity).  In many cases (and it is the case with LEGO ABS plastic), this deformation weakens the material (as mentioned by Kramii). 

To fix this part you have to deform it again thus breaking it even more.   Here are two things you could do: 


Force it back into shape and put small amount of Krazy Glue in the cracked areas. Hopefully this will fill the gaps and give some strength back to the gear.   
You could sacrifice an axle and glue (Krazy Glue) it permanently.  This would strengthen the gear a lot but condemn it to only be used with that axle.


I have a bunch of those small gears, I wish I could just give you one.