Harvesting-Based Wireless Sensor Devices are increasingly being deployed in today's sensor networks, due to their demonstrated advantages in terms of prolonged lifetime and autonomous operation. However, irreversible degradation mechanisms jeopardize battery lifetime, calling for intelligent management policies, which minimize the impact of these phenomena while guaranteeing a minimum Quality of Service (QoS). This paper explores a mathematical characterization of harvesting-based battery-powered sensor devices, focusing on the impact of the battery discharge policy on the irreversible degradation of the storage capacity. A general framework based on Markov chains which captures the battery degradation process is proposed. Based on such model, it is shown that a degradation-aware policy significantly improves the lifetime of the sensor compared to 'greedy' operation policies, while guaranteeing the minimum required QoS.