Only real way to remove pits on anything that is hardened, or going to used in a bare metal state, is to grind them out. Whether that is desirable, will depend on the position and depth of the pits.
If the object will be painted then use car body filler, after thoroughly removing the rust either...