When people get upset, it may bother their stomach. So keeping stress-free helps the stomach to be calm. If a person says they don't "have the stomach for that" it would mean they are not able to handle the stress of the situation or other person.
Other idioms along the same line:
That dress turns my stomach
His mean comment got me right in the stomach.