Depending on how bad it is, and how much you value the frame:
The Loctite Form-a-thread kit (#28654, or PC 3967) is a good basic thread repair system, and should be OK for a large diameter, low load fine thread like a BB shell. You spray a release compound on the male thread (cup), and a cleaner/primer on the female thread (BB shell), then mix and apply the epoxy into the thread and assemble. The release compound allows the cup to still be screwed out as normal.
I also have the 45° cutting tool for putting the appropriate chamfer on the BB faces if you're going down the threadless BB route, such as Mavic YST, or M-wave.
A quick and nasty repair (only for frames that you're not too attached to, probably) is to take a 2-3 mm straight cut across the underside of the BB shell. Close up the shell with a combination of brute force and heating, then weld or braze up the gap, then retap the threade into the fresh metal of the now slightly smaller diameter shell.
As
@Peachy! mentioned above, I have repaired several BB shells by reaming out the old thread to a larger diameter, tapping out to Italian spec,
View attachment 598535
then fitting a pair of thread repair helicoils.
View attachment 598534
These are steel inserts that are screwed into the Italian thread, held in with Loctite 638 Retainer, with a standard BSA thread on the inside.
This is the best way to sort it out.
PM for more details if you're interested.
View attachment 598536
All the best,