Uhg! It happens to the best of us though! Just pick yourself right back up and get back on the wagon. It only takes 3 days to get back into ketosis, so all is not lost!
One reason they recommend not having alcohol is because it is an appetite stimulant. That might be part of why you ate off plan. I know when I drink I can't stop myself from pigging out on french fries and anything else that I come across.
Also, I bet your weight gain was mostly water weight from the carbs and salty food. I doubt there's any way you ate 9000 calories (~3500 kcal = 1 lb). Just get back onto your Medifast plan and I'm sure it will come right back off!
You can do this!