We present a coherent database of spectroscopic observations of far-IR fine-structure lines from the Herschel/Photoconductor Array Camera and Spectrometer (PACS) archive for a sample of 170 local active galactic nuclei (AGNs), plus a comparison sample of 20 starburst galaxies and 43 dwarf galaxies. Published Spitzer/IRS and Herschel/SPIRE line fluxes are included to extend our database to the full 10-600{mu}m spectral range. The observations are compared to a set of Cloudy photoionization models to estimate the above physical quantities through different diagnostic diagrams. We confirm the presence of a stratification of gas density in the emission regions of the galaxies, which increases with the ionization potential of the emission lines. The new [OIV]25.9um/[OIII]88um versus [NeIII]15.6um/[NeII]12.8um diagram is proposed as the best diagnostic to separate (1) AGN activity from any kind of star formation and (2) low-metallicity dwarf galaxies from starburst galaxies. Current stellar atmosphere models fail to reproduce the observed [OIV]25.9um/[OIII]88um ratios, which are much higher when compared to the predicted values. Finally, the ([NeIII]15.6um+[NeII]12.8um)/([SIV]10.5um+[SIII]18.7um) ratio is proposed as a promising metallicity tracer to be used in obscured objects, where optical lines fail to accurately measure the metallicity. The diagnostic power of mid- to far-infrared spectroscopy shown here for local galaxies will be of crucial importance to study galaxy evolution during the dust-obscured phase at the peak of the star formation and black hole accretion activity (1