Under geologically relevant conditions, Eu is a multivalent element, exhibiting divalent character in reduced systems and trivalent character in oxidized systems. Its mineral-melt and mineral-mineral partitioning behavior is sensitive to oxygen fugacity (fO2) and can be leveraged in oxybarometers that recover fO2s from natural samples if the partitioning behaviors of the divalent and trivalent species are known. We present a lattice strain-based predictive model for partitioning of divalent elements between basaltic silicate melts and the clinopyroxene M2 site. The model accurately and precisely recovers experimentally determined partition coefficients (Sr, Ca, Mn and Zn) as a function of pyroxene composition and temperature. The new divalent element partitioning model is coupled with published trivalent element partitioning models to develop an fO2-, temperature- and composition-dependent clinopyroxene-melt Eu partitioning model. The clinopyroxene-melt Eu partitioning model is coupled with a plagioclase-melt Eu partitioning model to develop an Eu-in-plagioclase-clinopyroxene oxybarometer for cumulate rocks. Applied to lower crustal gabbros from oceanic lithosphere exposed at the southern Samail ophiolite and the east Pacific rise (Hess Deep), the oxybarometer recovers fO2s indistinguishable from the fayalite-magnetite-quartz buffer within error (~±0.5 log units), in agreement with basaltic glasses from mid-ocean ridges. Application to a lunar anorthositic breccia recovers an fO2 ~2 log units below the iron-wüstite buffer.