Switch from one battery to another when one is discharged/disconnected?
You want to do some research into battery backup circuits built around an SCR (A Silicon Controlled Rectifier).

The basic principle will be something like the below diagram, but incorporating two batteries rather than a battery backing up a rectified AC power source:







simulate this circuit &ndash; Schematic created using CircuitLab

I studied this circuit in a power electronics course in college. The lamp is initially illuminated by the rectified DC from the transformer, and the battery is simultaneously charged by that same DC current. If there is an interruption in the AC signal driving the transformer, the battery will discharge through R2, driving the gate of the SCR and allowing current from the battery to flow through the SCR to the lamp.

I know this isn't exactly what you're looking for, but I think it should be a good starting place for your solution. You'll just need to do some prototyping / experimentation with SCR circuits.