You want to replicate photosynthesis without sunlight. My proposal: in the place of radiant energy from the sun, use radiant energy sources available underground.
As opposed to the energy in visible light, your underground oxygen generators fix carbon for themselves using alpha radiation. Alpha radiation is produced by uranium, thorium and most importantly for this application, radon gas. Radon is produced by decay of uranium and radium and because it is a gas, it circulates around for a little bit before it decays by emitting an alpha particle. Radon builds up in underground spaces. Either radon or radiation from the heavy elements themselves provides the energy to turn CO2 into O2 and H2O.
Your subsurface creatures need reduced carbon to build their bodies, just as we all do. Their chloroplast equivalents harness the energy from alpha particles to do the work. I can imagine these things growing as a layer on radioactive rocks, or in areas where radon gas is abundant.
CO2 can be found in large deposits underground as is evidenced by the fact that volcanoes kick out huge amounts and so these creatures could evolve in the absence of regular miner visits. I have wondered if ecosystems like this might actually exist. It might be difficult to recognize them and certainly difficult to culture them since they require alpha radiation. I could imagine though that in the company of miners there might be a bloom of such organisms - organic nitrogen is in short supply in the deep earth. Organisms bringing nitrogen down from topside and depositing it in their waste would provide plenty of nitrogen.
A different scheme with the same general idea. Environmental energy is harvested by organisms which straddle a high energy / low energy divide. We do this by harnessing the oxidation of reduced carbon, which would happen anyway in an oxygen atmosphere. Photosynthesizers harvest incoming solar energy which would expend itself as heat on hitting the earths crust.
An organisms which straddled a thermal difference could harvest the heat energy, which would heat the organisms substrate anyway. An example might be organisms which grew on a a cool rock with one part of the organism exposed to hot water - or a hot rock with one part of the organism in cool water. A steam engine works on a similar principle - a phase change in the heat captures heat energy, and then releases it when cooled.
An organism might similarly capture energy via some molecule which captured some heat energy on the hot side, then released it on the cold side. Probably this would not be a phase change but some sort of isomeric configuration change. Or hydration change. Candidate molecules to mediate this sort of energy transfer via hydration change include metal ions, methane/methane clathrate systems or large organic macromolecules