Over the last decades, electricity demand and supply have become more decentralized, and the opportunities for locally managed microgrids have increased. Especially for residential microgrids consisting of multiple residential buildings equipped with a substantial share of local thermal and electrical energy production, flexibility is needed to balance energy demand and energy supply over time. Battery energy storage systems (BESSs) and thermal energy storage systems can provide this flexibility. Even though some BESS solutions are already available on the market, BESS still suffer from technical limitations and entail high investment costs. As BESS deteriorate over time depending on usage characteristics and the surrounding conditions, actively managing these parameters will largely affect their potential lifetime and the economic viability of their application. The majority of current research has focused on using BESS to optimize energy systems for economical, ecological, and technical objectives, but barely considered battery aging in the optimization models themselves. To contribute to closing this research gap, this article proposes an optimization model for the optimal day-ahead management of a multi-building district considering battery aging costs (BAC) derived from specific literature on battery degradation mechanisms. The resulting non-linear model is linearized and solved by using a commercial solver. Computational studies are performed to illustrate the case of a hybrid integrated local energy supplier responsible for the multi-building district, and sensitivities of its operating profits towards different sizing and pricing parameters are investigated. Results confirm the importance of considering BAC in decision support models for managing energy systems, both for a cost-efficient management of battery operations and to improve battery lifetime. The results also indicate that the application of BESS in day-ahead markets are only relevant for future cost levels of the technology.