The approach described by @JRE is identical to how a digital frequency divider works and has the limitation that it is only edge sensitive (so works well in high SNR conditions but not optimum for lower SNR's where we may have multiple zero crossings as the horizontal axis is transitioned). Here is an approach that can work with every sample and thus be more optimized for lower SNR conditions:
Measure the phase of the tone, determine the sample to sample phase difference (which is proportional to the frequency) and divide that phase difference by two (simple bit-shift) and accumulate that divided phase result to recreate the divide by two tone.
Phase measurements can be done with real or complex tones, and the created divide-by-two tone can be created with a CORDIC Rotator or Numerically Controlled Oscillator (NCO), (or any equivalent process to compute the cosine of the phase argument).
If a phase measurement with complex tones is desired, a Hilbert Transform can be used to convert the real tone in the form $x[n] = A\cos(\omega n +\phi)$ to the complex form $x[n] = Ae^{j(\omega n + \phi)} = I[n]+jQ[n]$).
Create the divided signal by tracking the phase change from sample to sample and dividing that phase change by two. This requires a phase computation of which can be done with $atan2(Q,I)$ or any of multiple optimized phase recovery methods as detailed here, where the phase difference can be detected directly (Note that the difference in phase is directly proportional to frequency), or if cycle time is not a premium the CORDIC algorithm:
phase difference detection
Phase synchronization in BPSK
CORDIC, What is it?
Dividing by two digitally is simply a bit shift. Once the new phase difference is determined, accumulate that to create phase versus time and then use a look-up table to produce the divide by two frequency output. (Note that this structure is done with a Numerically Controlled Oscillator, where optimized look-up tables are used with quarter-cycle storage, etc, or the CORDIC Rotator if cycle time is not a premium). Note how the CORDIC can be used for both determining the original phase step and rotating the divide by two signal at half the rate.
The original signal can be synchronized to the divide by two signal with an additional absolute phase measurement against an arbitrary reference, and therefore an approach that computed the phase difference from the absolute measurements would be preferred.