How are batteries chosen to be put in pacemakers?

Manufacture specific. The companies that manufacture pacemakers design their own batteries to optimize the longevity of the device. The batteries are not replaced when depleted; the entire pacemaker is replaced.
They're not. We're not picking duracell vs energizer here. These things were all lithium iodide cells until very recently because of its ideal characteristics (no off-gassing, stable discharge, heat stable, and extraordinary energy density). Icds need a different chemistry with lower internal resistance, and both devices now have hybrid battery techs. Batts aren't replaceable without changing the whole pm.