How not to die while having depression?

I believe I suffer from some kind of depression. I can’t get out of bed and I don’t sleep at night maybe due to anxiety and during the day I don’t want to wake up and I try to sleep as much as I can. when I am awake, I could lie in my bed for hours but I can’t get up to cook some food and if I did, I wouldn’t want to eat it... I’ve lost lots of weight, and I was told I’ve an uti, low iron and maybe hypoglycaemia... I don’t know if you could call this anorexia bc it’s nothing against food or not wanting to eat... it’s that I can’t or have any energy or motivation to do so. While I try to get better some days, I have to do something to not die for malnutrition and I am the only one I’ve Ana I don’t wanna have to explain what’s going on to people when they ask and judge my life... so, the least I can do is avoid dead, but how? I’d like some recommendations. Thank you