Your best answer is replace both.
Once a hardened bearing surface is damaged, it generally can't be repaired economically. Short term fixes like epoxy or JB Weld work for a while but break down within months or weeks.
For your application, a brand new square-taper bottom bracket cartridge will cost around $40 and will never need preload adjustment. And they're a lot more water-resistant than open cup and cone bearings.
UN-55 and UN-26 are Shimano codes for this item. You have to match the overall spindle length.
If the bike is weird or the part is unusual, then the JB Weld fix might be your only option. I've heard of people doing Brazing to fill the holes, but this can't be hardened.
One repair would involve normalising the axle in a heat-treat oven, welding it up and then turning it back down to shape using a lathe, and finish with a heat treat. Problem is the weld won't heat-treat like the rest of the metal. At that point you're up for making a whole new axle out of tool steel and then heat treating it. This would require a machine shop's worth of tools and ovens. While possible, would be cost-prohibitive. AND then you have to make/repair the cup too.
I once had a quad-chainring bike that had a super long spindle that was not available, so had to make do with an epoxy repair that lasted months until I gate the bike away.