We present a general model of actin filament deformation and fragmentation in response to compressive forces. The elastic free energy density along filaments is determined by their shape and mechanical properties, which were modeled in terms of bending, twisting, and twist-bend coupling elasticities. The elastic energy stored in filament deformation (i.e., strain) tilts the fragmentation-annealing reaction free-energy profile to favor fragmentation. The energy gradient introduces a local shear force that accelerates filament intersubunit bond rupture. The severing protein, cofilin, renders filaments more compliant in bending and twisting. As a result, filaments that are partially decorated with cofilin are mechanically heterogeneous (i.e., nonuniform) and display asymmetric shape deformations and energy profiles distinct from mechanically homogenous (i.e., uniform), bare actin, or saturated cofilactin filaments. The local buckling strain depends on the relative size of the compliant segment as well as the bending and twisting rigidities of flanking regions. Filaments with a single bare/cofilin-decorated boundary localize energy and force adjacent to the boundary, within the compliant cofilactin segment. Filaments with small cofilin clusters were predicted to fragment within the compliant cofilactin rather than at boundaries. Neglecting contributions from twist-bend coupling elasticity underestimates the energy density and gradients along filaments, and thus the net effects of filament strain to fragmentation. Spatial confinement causes compliant cofilactin segments and filaments to adopt higher deformation modes and store more elastic energy, thereby promoting fragmentation. The theory and simulations presented here establish a quantitative relationship between actin filament fragmentation thermodynamics and elasticity, and reveal how local discontinuities in filament mechanical properties introduced by regulatory proteins can modulate both the severing efficiency and location along filaments. The emergent behavior of mechanically heterogeneous filaments, particularly under confinement, emphasizes that severing in cells is likely to be influenced by multiple physical and chemical factors.