We present large-scale 9' x 27' (similar to25 pc x 70 pc) far-IR observations around Sgr B2 using the Long-Wavelength Spectrometer (LWS) on board the Infrared Space Observatory (ISO). The spectra are dominated by the strong continuum emission of dust, the widespread molecular absorption of light hydrides (OH, CH, and H2O), and the fine-structure lines of [N II], [N III], [O III], [C II], and [O I]. The widespread dust emission is reproduced by a cold component (T-d similar or equal to 13 - 22 K) together with a warm component (T-d similar or equal to 24 - 38 K), representing less than or similar to10% of the dust opacity. The fine-structure line emission reveals a very extended component of ionized gas. The [ O III] 52 mum/88 mum and [N III] 57 mum/[N II] 122 mum line intensity ratios show that the ionized gas has an average electron density of similar to 240 cm(-3). The ionizing radiation can be characterized by a hard but diluted continuum, with effective temperatures of similar to 36,000 K and a Lyman continuum photon flux of similar to 10(50.4) s(-1). The spatial distribution of the ionizing sources with respect to the extended cloud and the clumpiness of the medium determine the large-scale effects of the radiation. Photodissociation regions (PDRs) can be numerous at the interface of the ionized and neutral gas. The analysis of the [C II] 158 mum and [O I] 63 and 145 mum lines indicates a far-UV radiation field of G(0) similar or equal to 10(3)-10(4) and a density of n(H) = 10(3)-10(4) cm(-3) in these PDRs. The widespread OH lines are reproduced by nonlocal radiative transfer models for clouds of moderate volume density (n(H2) similar or equal to 10(3)-10(4) cm(-3)) at T-k greater than or similar to40 - 100 K. PDR models can explain the enhanced column density of species such as H2O, OH, and O-0. However, they fail to reproduce the observed NH3/NH2/NH similar or equal to 100/10/1 abundance ratios. For N-bearing species, it seems that shock chemistry has to be invoked. The molecular richness in the outer layers of Sgr B2 is probed by the ISO/LWS Fabry-Perot (similar to 35 km s(-1)) detections toward Sgr B2( M), where more than 70 lines from 15 molecular and atomic species are observed at high signal-to-noise ratios.