The mechanical analysis of surrounding rock after chamber excavation is of great significance for revealing the essence of stratum disturbances. Based on the Schwarz alternating method, a shallow rectangular chamber model was decomposed into a rectangular hole problem in an infinite plane and a half-plane problem. The general iterative expression and the explicit stress solution in shallow rectangular chambers when the mapping coefficient takes three terms were established by processing the boundary conditions with a mapping function and Fourier series. Then the analytical solution of the energy density accumulation of the surrounding rock was deduced, and the reliability of the theoretical solutions of the stress field and energy field were verified by numerical simulations. The disturbance laws of the lateral pressure coefficient, burial depth and chamber shape on the two fields were also analysed. The results show that the horizontal stress at the sidewall increases with increasing lateral pressure coefficient and burial depth. The peak of the vertical stress moves away from the wall with increasing lateral pressure coefficient. The energy accumulation at the corner increases with increasing chamber height and decreases with increasing burial depth and chamber width, forming a high stress area at the sidewall. With increasing Poisson's ratio, the corner energy distribution gradually flattens, and the energy decays more rapidly with distance.