Gas bremsstrahlung, generated by the interaction between stored electrons and residual gas in electron storage rings, is an important radiation source for the shielding of synchrotron radiation (SR) facilities. In recent SR facilities, hydrogen was found dominant in the residual gas of the vacuum chambers of the electron storage rings, although air has been conventionally assumed as the bremsstrahlung target for the shielding designs of SR beamlines extended from the electron storage ring. To study the effect of residual gas composition on the dose rate outside shields, we calculated the intensity of gas bremsstrahlung based on the gas composition for both the air and the residual gas expected in the recent electron storage rings using an analytical formula and general-purpose Monte Carlo codes for particle transport calculations. The analytical shielding calculation with a realistic gas composition was found to well reproduce the energy spectra of gas bremsstrahlung simulated by the Monte Carlo codes. The correction factors between the air and the realistic gas compositions are applied to the conventional analytical formulas for dose estimation of secondary radiations generated by the interaction between the bremsstrahlung from air and beamline components.