For a start, Winchester 1897 "trench guns" were used to some extent in both WWI and WWII. Winchester Model 12s were used in WWII, and Ithaca Model 37s in Vietnam along with both Winchester models.
Both the Army Air Corps (Army Air Forces) and the Navy used shotguns for training aerial gunners. These were regular commercial shotguns, sometimes purchased "off the shelf." Savage/Stevens sold many of their Model 520 to the Army; these had 20" barrels, but no handguard or bayonet lug.
True combat use can be hard to track down. Most military shotguns were used for training, prisoner guarding, riot control, etc. In addition, there is the fact that using shotguns without jacketed pellets in combat would violate the Hague convention, but this would not have applied in Vietnam, which was technically an insurgency.
I have ordered Bruce Canfield's WWI book but have not yet received it; I am sure he will have a lot on this subject at least as pertains to WWI.
HTH
Jim