Halitosis can be caused by a number of different agents. In most cases (80-90%) bad breath originates in the mouth itself. Mouth anaerobic bacteria are to blame (bacteria able to live without oxygen). They produce detectable foul gases that are a result of breaking of certain amino acids. These gases are associated with oral malodors and bad breath. The bacteria are generally positioned in the sub-gingival niches and on the upper surface of the tongue.
Stomach diseases rarely cause halitosis.
With an optimal oral hygiene and targeted therapy for inflamed gums and periodontitis, problems with bad breath will be resolved automatically, if of course, there is no other cause of bad breath.