Bit of a vent as i need to get this off my chest but also looking for some constructive advice.

Since May i have been trying to lose weight. I have been going to the gym, eating healthy (although i do slip up sometimes) and they weight will not budge. I am sooo over it. For the last week i have been going to the gym and burning 300-500 calories at a work out and reducing my portion sizes etc and i got on the scales today and i have gained 1.2kg. What the??? Last week when i was really unmotivated and went to the gym only once i actually lost 1kg!! Grrr I just dont know what to do any more. I am so frustrated and dont know what to do any more. I want to get back to my pre preg self, I dont fit into any of my clothes in my wardrobe and feel terrible. Iv never had to lose weight in my life and feel like a complete failure about it all. Arghh!! Help please, i just dont know what to do anymore.