Self-healing is an autonomic computing fundamental well-disseminated in standalone computer systems. In distributed systems, e.g. computer networks or mobile networks, the introduction of self-healing capabilities poses some challenges, mainly when softwarebased networks, e.g. Software-Defined Networking (SDN) and Network Functions Virtualisation (NFV), are involved. Such networks impose new control and management layers, and the adoption of self-healing functions means that all layers must be considered. In this paper, we present the challenges of self-healing in the scope of SDN and NFV, by revising the self-healing concept in computer and mobile networks, and by presenting the thorough difference between a system that applies fault tolerance from one that applies self-healing functions. We also introduce a framework for solving these challenges, by describing four use cases of self-healing, considering control, management, and data layers. The use cases focus on maintaining the health of the network at run-time, considering control, management, and infrastructure layers. Our framework is a novel Operations, Administration, and Maintenance (OAM) tool, based on a self-management network architecture that was introduced in our previous works.