Often when you are going through bouts of severe stress or anxiety, you neglect your diet. Either you don't eat enough, or you eat very poorly. Probably weren't drinking enough fluids either. I would trust your Gastro's diagnoses and chalk it up to constipation or build up in the intestines. Eat a hearty salad each day, drink plenty of water. Take some long walks too. See how it goes over the next couple of weeks.
I went to a gastro - he told me to eat more fiber.
Find another doctor like a Gastroenterologist.....this is their specialty.......the digestive tract! This doesn't sound at all like anxiety and you need to get checked out more thoroughly and kick your current doctor to the curb!