I understand where you are at. Nearly all men have to navigate this it seems and it takes a while to understand your value. As DHF said, reset your life, decide on how to make your health better and stick to it for at least 6 months if not your lifetime. If you have friends leading you down the wrong path I would not consider them friends if they are not supportive of things that are important to you.
I would not enter a relationship until you are in a good place. It is not fair to either of you, esp, her. Gdt yourself on the right track and have a healthier lifestyle before broaching that.
I still go through bouts of what you are going through but for a couple weeks at a time every once in a while. Depression is hard to manage sometimes but we work at it. i am 60 and have made it this far so I know you can do it. Right now I am getting out of one of those bouts after Wrigley passed. It will take a few months to get my mind right but memories of things creep in like things with him....things I did overseas in Marines. It doesn't get easier unfortunately but you can work through it with some patience and self help.