Perhaps in some cases. I think it could be more objectively viewed as a coping mechanism or a maladaptive coping strategy.
I think there is a relevant nuance between engaging in behaviours where the outcome may harm the body, and 'self-harm' as it is clinically understood - an action taken to intentionally cause a negative physical or psychological outcome.
Where would smoking fit into this framework? Smoking causes well established harm to the body, yet it is not generally classified as self-harm. Likewise, a person experiencing depression might stop exercising or eating healthily, which can degrade physical health over time and increase the risk of illness. Would these behaviours also be considered forms of self-harm, or are they better categorised as something different?