Smoke is normal in an electric oven, but flames are definitely not.
In order to start a fire, you either need a spark, or you need to heat something beyond its autoignition temperature (AKA kindling point). You might have had a short - or you might actually be using a gas oven with spark ignition - but I'm guessing your issue was the latter.
Cooking oil or grease being heated beyond its autoignition point is one of the most common causes of kitchen fires (grease fires). Supposedly, some oils have autoignition points as low as 550° F (or 288° C), though I'm not sure which oils those are. Olive oil would be my guess as the lowest, but pepperoni grease could very well have ignited at self-cleaning temperatures (which, as you noticed, go up to nearly 1000° F).
Fortunately for you, all modern ovens have a mechanical interlock which prevents them from being opened during a self-cleaning cycle. If you'd opened it, you would have made the problem a lot worse by (a) supplying the fire with abundant oxygen, and (b) drawing all the hot air and flames out of the oven and into your kitchen, quite possibly setting your whole home on fire. Heat wants to move to where it's cold; that's why you keep your doors and windows closed in the winter.
There are a multitude of oven cleaners available for self-cleaning ovens - you are supposed to use these before you run a self-cleaning cycle. Yes, I know it's odd, but "self-cleaning" doesn't really actually mean that it cleans itself, it just gives you a little extra help. You need to try to clear out all the grease and big chunks of food first using one of these cleaners, then run the self-cleaning cycle to deal with anything you might have missed.
Hot water and detergent might be enough, but after serious mold growth, I'd use a disinfectant. The easiest way to do this would be to disinfect your cooker with bleach, which is very effective at killing mold on non-porous surfaces. After thoroughly washing and rinsing your cooker, make a solution of 10 parts water to 1 part bleach and allow it to soak in your cooker for a few minutes, then dump it out and allow the cooker to air dry.
Using Bleach on Mold (note that the caveat here is that bleach isn't effective for porous surfaces. Anything that you're cooking on should be an acceptable surface for using bleach on.)
Best Answer
Honestly? I would scrub the pot, and then toss it in the dishwasher and be done with it. So long as the smooth surface (notice I did not say scratched up) is clean meaning no visible soil, then running it through the dishwasher with its hot water, detergent and possibly drying cycle will be more than enough. It's not like you have some biochemical experiment you need to avoid doping. Just practice good hygeine with your cooking equipment and you'll be fine.