You don't want to get hooked on taking a pill to sleep -- eventually the insomnia will just get worse. There are some natural sleep remedies that don't do this -- melatonin about 1mg or so is probably the best -- but obviously, you have to find one that works. What you want to ideally, though, is figure out why you can't sleep and fix it. As for eating when you get up, that's just discipline. We can't supply that for you. If you know it's bad for you and you keep doing it, that's a problem for a therapist, not a nutritionist. But you do need to learn a lot about eating -- sugar free foods are even worse for you than the ones with sugar in them usually because the synthetic chemicals are more toxic than sugar. What you want to do is establish a permanent way of eating that is better for you and gets you where you want to be, combined with exercise. You've also lost a lot of weight in a very short time -- hopefully, you're doing this in a healthful manner or it won't last. But that's pretty impressive. But you're too focused on calories -- how you metabolize food is more important. If you want to see someone, don't see a dietician, see a holistic nutritionist. Dieticians are the ones who devise cafeteria menus in schools and hospitals -- not very healthful places to eat.
You don't need to use any sleeping pills or else you need to consult your doctor.