Dieting with an extreme calorie deficit for a prolonged period of time is like playing with fire. Your body is incredibly adaptive and efficient; the longer you maintain the deficit, the better your body gets at using fewer calories to function.
Suppose your maintenance caloric expenditure is about 2000 calories per day, and you cut that in half to lose weight, plus throw in trips to the gym. Initially you will lose weight, but your body will figure out how to function with fewer calories. After a few months your weight loss will stall, so you cut more calories. Your body adjusts again. Get the picture? Eventually you will be in a position where you still have weight to lose, you are eating 600 calories a day and working out like a crazy person – and you’re not losing weight.
Inevitably you get frustrated, quit your diet and go back to your 2000 calories a day. The problem is, your body now functions off of 1000 calories a day and in the interim of getting used to the normal intake of 2000 calories it will store the excess, a whopping 1000 calories a day. Welcome to metabolic damage and the danger of extreme dieting.
How do you avoid this? Maintain a REASONABLE calorie deficit, a few hundred calories a day. Take regular dieting breaks and eat at maintenance calorie level occasionally. Build lean body mass, the more muscle you have, the more calories your body needs to function, increasing your maintenance calorie levels and making it easier to get lean without huge restrictions.
Don’t beat yourself up over a short term gain, you could end up doing a world of damage and eventually weigh more than you did when you started.