Duracoat offers a filler, Durafil, over which you apply their paint type coating.
I know of nothing else meant to fill pits in gun steel.
The only way to really remove pits is to remove metal around the pits down to the bottom of the pits. That will not make your barrel dangerously thin but unless very well done, it could leave waves and divots from the polishing.
If it were mine, I would be sure it is cleaned of rust, then bead blast and blue or Gunkote. Live with the pits and go shooting.