Car started to run like crap then fixed it's self

I had a werid expereince saturday night I went out to race a bike and after he smoked me! Me and a friend raced on topend well when I let off the gas my car died or somthing I would give it gas and the engine wouldn't do anything. When I slowed down it started working right. I had to stop at a stoplight and it was idling rough and smoking. Well I left that red light and was stoped at the next one and it died and woudn't crank so I pushed it to the side of the road and tried to crank it somemore. It would crank up but wound't idle kinda like it had a bad vacum leak and if you gave it gas it would die. Also alot of black smoke was coming outta the exhaust. Well I was freakin out and I keep tryin to crank it and keep it runnin to see if I could get it to run long enough to make it home. After about 15mins I tried to crank it and it crunk up and ran fine. And its still running fine like nothing ever happened. Does anyone have a clue as to what might had happened?
 
Had you recently ran anything strange through your intake or gas tank? My wife's Jeep had a similar experience after I seafoamed it, it got going, sputtered, and basically died, puffed out some black smoke, then magically cleared up and was fine. I always figured an o2 sensor got some crap on it, made the ECM think it was lean as hell, compensated by going too rich, flooding it out, then the piece of whatever blew back off the sensor, and it cleared up, resulting in the black cloud (the extra fuel burning up.)

That's my theory, not sure if it's true or not, but it hasn't happened since.. so I keep telling myself it was just the seafoam.
 
no I wasn't sprayin when it happened. It happened after I raced the bike.

Well I thought it was a 600! After we took off my bottle presure drop down to about 600psi so I was pretty much outta juice, not that it would had made a difference away! I did though one time race a R6 from a roll and we were side by side and had to let off pretty quick im sure he would had caught me.