The energy density functional proposed earlier by Fayans and his coauthors is modified in such a way as to apply it in fully self-consistent calculations of isobaric analog resonances (IAR) in nuclei featuring pairing. The continuum quasiparticle random-phase approximation is used. Limits on the parameters of screening of exchange Coulomb interaction are deduced from a systematic analysis of binding energies of isobaric doublets and transition energies for isobaric triplets in mirror nuclei. A comparison with experimental data shows that the IAR energies for neutron-rich tin and lead isotopes involving fully developed pairing are described better on the basis of the new functional DF3-f than on the basis of self-consistent calculations performed with the DC3$$\ast$$ relativistic functional or with the SAMi Skyrme functional. The DF3-f functional is applied to calculating the properties of IARs in ruthenium, palladium, and cadmium isotopes featuring pairing in both neutron and proton subsystems, as well as to calculating similar properties in the chain of $$N=82$$ isotones.