Aims. A significant fraction of early-type galaxies (ETGs) exhibit emission lines in their optical spectra. We attempt to identify the producing the emission mechanism and the ionized gas in ETGs, and its connection with the host galaxy evolution. Methods. We analyzed intermediate-resolution optical spectra of 65 ETGs, mostly located in low density environments and exhibiting spectros-copic diagnostic lines of ISM from which we had previously derived stellar population properties. To extract the emission lines from the galaxy spectra, we developed a new fitting procedure that accurately subtracts the underlying stellar continuum, and accounts for the uncertainties caused by the age-metallicity degeneracy. Results. Optical emission lines are detected in 89% of the sample. The incidence and strength of emission correlate with neither the E/S0 classification, nor the fast/slow rotator classification. By means of the classical [OIII]/Hβ versus [NII]/Hα diagnostic diagram, the nuclear galaxy activity is classified such that 72% of the galaxies with emission are LINERs, 9% are Seyferts, 12% are composite/transition objects, and 7% are non-classified. Seyferts have young luminostiy-weighted ages ( 5 Gyr), and appear, on average, significantly younger than LINERs and composites. Excluding the Seyferts from our sample, we find that the spread in the ([OIII], Hα, or [NII]) emission strength increases with the galaxy central velocity dispersion σ c . Furthermore, the [NII]/Hα ratio tends to increase with σ c . The [NII]/Hα ratio decreases with increasing galactocentric distance, indicative of either a decrease in the nebular metallicity, or a progressive "softening" of the ionizing spectrum. The average nebular oxygen abundance is slightly less than solar, and a comparison with the results obtained in Paper III from Lick indices shows that it is ≈0.2 dex lower than that of stars. Conclusions. The nuclear (r < r e /16) emission can be attributed to photoionization by PAGB stars alone only for ≈22% of the LINER/composite sample. On the other hand, we cannot exclude an important role of PAGB star photoionization at larger radii. For the major fraction of the sample, the nuclear emission is consistent with excitation caused by either a low-accretion rate AGN or fast shocks (200-500 km s −1 ) in a relatively gas poor environment (n 100 cm −3 ), or both. The derived [SII]6717/6731 ratios are consistent with the low gas densities required by the shock models. The derived nebular metallicities are indicative of either an external origin of the gas, or an overestimate of the oxygen yields by SN models.