This paper presents a Lithium-ion battery control framework to achieve minimum health degradation and electricity cost when batteries are used for datacenter demand response (DR). Demand response in datacenters refers to the adjustment of demand for grid electricity to minimize electricity cost. Utilizing batteries for demand response will reduce the electricity cost but might accelerate health degradation. This tradeoff makes battery control for demand response a multiobjective optimization problem. Current research focuses only on minimizing the cost of demand response and does not capture battery transient and degradation dynamics. We address this multi-objective optimization problem using a second-order equivalent circuit model and an empirical capacity fade model of Lithium-ion batteries. To the best of our knowledge, this is the first study to use a nonlinear Lithium-ion battery and health degradation model for health-aware optimal control in the context of datacenters. The optimization problem is solved using a differential evolution (DE) algorithm and repeated for different battery pack sizes. Simulation results furnish a Pareto front that makes it possible to examine tradeoffs between the two optimization objectives and size the battery pack accordingly.