Greetings,
Do you, by chance, see a therapist? If not, please do so, for your reasoning, to me, seems quite scary. Not only is gaining weight harmful for you, the motivation you have to want to do so is clearly not healthy.
If you and your spouse are having marital problems, may I kindly suggest you two seek counsel from a marriage counselor?
Have a good one.