Energy harvesting is arising as a key technology in wireless systems, allowing continuous and prolonged operations. However, the bursty nature of the energy arrival process associated with renewable sources and the energy usage pattern caused by wireless protocols may cause considerable stress to the battery and eventually reduce its lifetime. In fact, deep charging and discharging cycles degrade the battery State of Health, that is, the maximum amount of energy that can be stored. In this paper, a framework for the optimization of wireless nodes' transmission strategy is presented, where battery aging rate is included as a constraint. The proposed framework is based on Markov Decision Process theory, where the embedded stochastic process models energy arrival and storage, and channel fading, as well as the control variables. Numerical results unveil the tension between packet delivery rate and battery degradation.