If you have several issues going on at once, you have to prioritize them. Healthy eating is important but if you are struggling just to stay afloat that might be more important right now. My diet goes out the window if I have other bigger issues going on, which I just dealt with in the recent past and now I am able to resume my diet again. Your first priority is to be kind to yourself and help yourself in any way you can. Do not feel guilty about pampering yourself when you need it.
And about stopping sweets. It may take a couple of weeks to get cravings under control. After a while you won't even crave sweets. And again, if you treat yourself now and then it calms the cravings and gives satisfaction so it's not looming large in your mind. You can replace a bad thing with a better thing, there is nothing wrong with using a crutch when needed.