Eating Problems

I've noticed that my appetite hasn't been that big. Recently I've also been going through a breakup and just thinking about everything and handling my emotions, my stomach just churns. Sometimes I go a day without eating and when I do feel hungry and consume foods I only eat a small amount / even if I do eat a decent amount I feel like throwing it up( but I really don't, just excessive gags). When I try eating again the next day my body just rejects the food and it doesn't taste good. Can emotional problems really affect food consumption seriously? I do continue to drink water throughout the day and a cup of coffee in the morning. Sometimes my stomach hurts after eating as well. It tightens up and makes noises :/ but I don't have any strange bowel movements.