I'd say the distinction between self harm and smoking is, as the quoted Merriam-Webster definition states, purpose versus consequence. The person who commits self harm is purposefully harming themselves to fulfil their desired relief. The smoker's injury comes from a consequence they choose to either ignore or accept as a a trade, rather than the act it's self.

You could make a similar argument about any form of self gratification with health consequences, like eating in a less than perfectly healthy manner because food tastes good.