Due to factory production discrepancies and different operation conditions, cells integrated in conventional battery systems are not similar. In a static series connection, the weakest cell limits the battery pack capacity. Self-reconfigurable batteries (SRB), where semiconductor switches allow cells to be connected or bypassed dynamically, are used to by-pass the weakest cell and so use the full battery capacity at any time. The in-line configuration even allows the direct generation of AC current without any power converter. This paper proposes an optimal lifetime management strategy for SRB generating AC current. A full battery cell model including ageing mechanisms is used to perform the minimization of the SRB capacity losses with the aim of demonstrating the SRB capabilities in terms of lifetime extension. A direct multi-shooting numeric method is used to solve the minimization problem on battery partial discharge, which is often encountered, like in the electric vehicle usage. Simulation results validate the proposed method and a major lifetime extension of 54% compared to conventional battery pack has been observed.