You asked for hard science, so here it is.
The key process in photosynthesis is the Joliot-Kok cycle. This is what "splits" water and produces $O_2$, along with the $H^+$ and $e^-$ that are used to create high-energy molecules. Here is the original proposal in a paper by Kok, and here is a link to the full text if you have access. The mechanism is complex redox chemistry, but is nicely summarized in the below diagram from this SE question, which actually got the diagram from here.
. Another SE question shows us where the light plays a role- when moving between the different $S$ states. As soon as we have $e^-$ and $H^+$, we have energy in chemical form that's often captured in cofactors such as $NADH$, $NADPH$, or $FADH_2$. These are all high-energy forms of their oxidized states- $NAD^+$, $NADP^+$, and $FAD$, respectively, and can be thought of as a kind of battery that gets charged by $e^-$ and $H^+$. In a sense, the "real" goal of photosynthesis is producing $e^-$ and $H^+$ from light energy which can then be used to "charge" the cofactors. So let's look at a couple ways to do this.
As a note, the cofactors aren't magic materials- just large organic molecules. $NAD^+ = C_{21}H_{27}N_7O_{14}P_2$, $NADP^+ = C_{21}H_{27}N_7O_{17}P_3$, and $FAD = C_{27}H_{33}N_9O_{15}P_2$
Simple (but realistic) solutions:
1) Thermosynthesis
There's no reason that the energy required to split water MUST come from light- that's just the way that current biology does it. With a different suite of enzymes and a different cycle, biology could extract energy from a wide variety of sources. In this case, thermosynthesis would rely on heat instead of light:
$H_2O+heat => O_2 + 4H^+ + 4e^-$
This mechanism would be different from the Kok cycle because you'd have a thermally activated alternative to P680 in the middle rather than photoreactive. So that's one solution- thermally activated P680.
Finishing the equation (this is identical to the light-independent reactions of photosynthesis):
$2H^+ + 4e^- + 2NAD^+ => 2H^- + 2NAD^+ => 2NADH$
2) Photosynthesis without water
Alternatively, one could use a different electron acceptor. This came up in the WB question that inspired this question (if we recurse much more we'll have to move to meta), and the solution was nitric and nitrous oxides, one of the most powerful electron acceptors in nature. It's plausible to imagine these nitrogen oxides taking the place of water in the normal photosynthetic pathway, producing $O_2$ and $N_2$ as a result. The researchers didn't have a mechanism for this, but it supposedly produces $O_2$ that is then used to oxidize methane. So that's another solution, looking something like
$2NO + light + H^+ => N_2 + O_2 + 2e^- + H^+$
Finishing the equation (again, identical to the light-independent reactions of photosynthesis):
$H^+ + 2e^- NAD^+ => H^- + NAD^+ => NADH$
Crazier ideas
This is Worldbuilding- let's stretch the limits of plausibility. Where else can we get energy from? Mechanical movement. My vision for this is some kind of kelp-like organism being tossed about by waves or tides, similar to the theoretical wave/tidal energy extractors. As the stalk of the kelp is stretched, it pulls on a long molecule. There are a couple ways we can get energy out of this.
3) Conformational changes
This is like what happens in your eye- a long molecule is unkinked (double bond switches from cis to trans) except we're using mechanical energy to straighten it. As it does that, it forces a conformational change in the molecule that pulls a hydride ($H^-$, or those all-important $H^+ + 2e^-$) off of water- starting a redox chain similar to the Kok cycle. The $^+OH$ would then be attacked by another water, forming hydrogen peroxide- this could decompose into $O_2$ and $H_2$ in the reverse of the normal process. Feasible? Not really. Good fiction? Maybe. Here's your formula:
$2H_2O + mechanical force + NAD^+=> H^- + ^+OH + H_2O + NADH => H_2O_2 + H_2 +NADH$
4) Radical chemistry
Similarly, we could use that mechanical force to tear apart a bond, creating two radicals. I'm imagining an $O-H$ bond, forming some alcohol radical and $H_{(rad)}$. The hydrogen radical would react with something like $FAD$. $FAD$ is another one of those cofactors that modern Earth biochem already uses, and it has a low energy state as $FAD$ and a high energy state when it's reduced to $FADH_2$. $FAD$ accepts two radical hydrogens in this mechanism, so it's perfect for our use. The alcohol radical would attack water to form a peroxide and proceed as above. Can I imagine it actually working? No. Will it help suspend disbelief for a fiction novel? Probably. Here's the equation:
$2RCOH + mechanical\ force + FAD +H_2O=> 2H_{(rad)} + 2RCO_{(rad)} + FAD + H_2O => FADH_2 + 2RCOH + H_2O_2 => FADH_2 + 2RCOH + H_2 + O_2$
where RCOH is a generic alcohol- perhaps ethanol ($CH_3CH_2OH$) or propylene glycol ($C_2H_6OHCOH$)
5) Beta radiation
This type of radiation produces a positron, the antimatter particle to an electron. When a positron and an electron collide, they annihilate. If that happened to a water molecule or something similar, it'd make a hydrogen radical that could get snapped up by FAD, forming a hydroxide ion. Not really sure how to get oxygen out of this, but perhaps it could be catalyzed into sodium peroxide and then into sodium hydroxide and oxygen gas. Equation:
$2e^+ + 2H_2O + FAD=> 2H_2O_{(rad)} + \gamma\ rays + FAD => 2H_{(rad)} + 2^-OH + FAD => FADH_2 + 2^-OH$
6) Gamma radiation
You specified "cannot use light" but I felt like the gamma-radiation eating fungi and bacteria deserved a shoutout. This light wouldn't be coming from a sun, it would be coming from a radioactive source probably deep within the Earth. Not sure if that counts, but I'll include the references here and here just in case. Their basic formula is the same as photosynthesis, albeit with much higher energy photons:
$2H_2O + \gamma\ rays => O_2 + 4H^+ + 4e^-$
To finish the equation, we use a cofactor yet again:
$4e^- + 2H^+ + 2NAD^+ => 2H^- + 2NAD^+ => 2NADH$