Weight loss blues

Help! I have been trying to lose weight for years and have actually put on 5kg in lock down (more than 10 pounds). I don’t know what to do any more. Every day, I write down what I am going to eat and blow it, usually after drinking more than I would like. Last night, it was a bottle of wine. I self sabotage, buffer my feelings, all the things. I am just not sure how to get the motivation or confidence to do this – I know they come from actually doing it, but what comes first? I am about to start a new, very demanding job – I do not think I would have been offered this if they knew my lifestyle and am scared stiff of totally blowing it. Many thanks.