I agree, @Menomeno - I have had clinical depression since my mid teens (although it was not diagnosed until I was in my 40s - up 'til then, I thought it was normal for a me to be so unhappy about bullying that I was contemplating suicide). I am sure that depression has had a big effect on my weight - a vicious circle of comfort eating, weight gain, hating myself for the weight gain, getting more depressed and then comfort eating more.
Basically, in my head, when I am at my lowest, I honestly believe that there is no point looking after myself in any way, including my diet - because the world wouldn't miss me and might be better off without me.
I am on antidepressants now, and will be for life. I have tried to come off them, but each time, have ended up in the blackest depression I've experienced, and have had to go back on them - I'm too scared even to try coming off them now. The tablets have stabilised my mood, and I am a long way from the worst of it - but I still struggle to look after my diet. And I have exchanged comfort eating for antidepressant induced cravings.
Add to that the fact that I have Long Covid, which leaves me utterly exhausted all the time, and breathless just from walking along the hall from the downstairs loo to the front room, making exercise pretty much impossible, and I feel like the obstacles in the way of me losing weight are almost insuperable.
I have had a bit of success with the 5:2 diet - two days a week, I only eat dinner - and if nothing else, this has reduced the number of calories I am eating each week. I can't say I have noticed much change, but when I saw family recently, who hadn't seen me since before Christmas, they thought I was better.