Hey Mel!
Not to be blunt, but holy cow. I'm sorry, he understands that you're on an antidepressant medication, right? A medication that is (presumably) keeping you safe and sane and allowing you to show up as a partner? Because if he does, then your post sounds like he's saying he'd be OK with you being miserable as long as you're thin. That's a huge red flag.
As a female-presenting person myself - jumping from size 20 after being size 10 is definitely a change, but your partner's response should be one of understanding and support, not throwing a tantrum because his d*ck is somehow more important than your mental health.
If you haven't already ran the gauntlet of trying other medications, it may be worth talking to your provider about your weight gain and seeing if there is another med you could try. Weight gain on medication is a real issue, but some meds are better than others in this regard. You might also want to consider if your current med is effective - I'm making assumptions here and am NOT a doctor, but overeating, binging on junk, and low energy levels often accompany depression. It could be that your med is fine but it's not as effective as before, which is leading to unhealthy behaviors.
Best of luck.