  We compute the electronic structure, spin and charge state of Fe ions, and
structural phase stability of paramagnetic CaFeO$_3$ under pressure using a
fully self-consistent in charge density DFT+dynamical mean-field theory method.
We show that at ambient pressure CaFeO$_3$ is a negative charge-transfer
insulator characterized by strong localization of the Fe $3d$ electrons. It
crystallizes in the monoclinic $P2_1/n$ crystal structure with a cooperative
breathing mode distortion of the lattice. While the Fe $3d$ Wannier occupations
and local moments are consistent with robust charge disproportionation of Fe
ions in the insulating $P2_1/n$ phase, the physical charge density difference
around the structurally distinct Fe A and Fe B ions with the ``contracted'' and
``expanded'' oxygen octahedra, respectively, is rather weak, $\sim$0.04. This
implies the importance of the Fe $3d$ and O $2p$ negative charge transfer and
supports the formation of a bond-disproportionated state characterized by the
Fe A $3d^{5-\delta}\underline{L}^{2-\delta}$ and Fe B $3d^5$ valence
configurations with $\delta \ll 1$, in agreement with strong hybridization
between the Fe $3d$ and O $2p$ states. Upon compression above $\sim$41 GPa
CaFeO$_3$ undergoes the insulator-to-metal phase transition (IMT) which is
accompanied by a structural transformation into the orthorhombic $Pbnm$ phase.
The phase transition is accompanied by suppression of the cooperative breathing
mode distortion of the lattice and, hence, results in the melting of bond
disproportionation of the Fe ions. Our analysis suggests that the IMT
transition is associated with orbital-dependent delocalization of the Fe $3d$
electrons and leads to a remarkable collapse of the local magnetic moments. Our
results imply the crucial importance of the interplay of electronic
correlations and structural effects to explain the properties of CaFeO$_3$.
