When stressed out heavily, it takes a toll to your digestive system. Your body will think it doesn't matter and only cares of staying alive which will lead to weight gain.
Like any other thing in the world there is a way to prevent it. Some of the ways you can do that is by walking. Walking will take your mind off things and will only focus on that one thing.
Though stress can kill it is meaningless when you're with someone else. Being with someone you love or like can rest your heart and make you feel happy.