A simple schematic would help. It appears you want to charge a 12V battery with a 12V source, or you are placing two power supplies (+12 & -12)in series generating 24VDC. Sounds great but it will not work. To charge a battery you need to push current into it. To do that your voltage has to be higher than the terminal voltage of the battery. 13.8V is the voltage typically used for a lead acid or SLA battery. Check the battery specification to be sure. Applying 24V as you are suggesting will cause some nasty smelling smoke if left connected. You need to regulate the current to protect both the battery and power supply. You can get a buck or buck/boost module from your favorite china supplier that will do the job for a few bucks. The boost or sepic converters will allow you to do your thing with 12V. You also have a potential back feed problem via the mains ground.
As you can see i want to detect (through the power good wire) if the main power is cut off
I want my arduino to be able to move from main power to battery power without disruption
What kind of device can i put for the "Battery charger" ?
To charge a 12V lead acid battery one needs 13.8V and to charge a 12V LiFePo4 ones needs between 13.8 and 14.8 volts. To start with you need a 13.8V supply.
For a lead acid battery if the volts across the battery is 13.8, wire the battery across the 13.8V line and let the battery act as a capacitor, until power loss.
For Li batteries you'll want a BMS, most have built in BMS, and a LiFePo4 charger. With the LiFePo4 and a charger, wired the battery to the output of the charger and use the 12V battery as a capacitor, until the power goes out.