Weight issues

I need to lose weight. I need to be skinny for Christmas. I see myself as fat but whatever I try I never lose weight. I’ve stopped eating to the point where my body can’t take it and I pass out. I need a real diet. I go to the gym but there I struggle to feel confident in tight leggings. Advice on diets which actually work?