Although it is supposed to stand for "Shaking my head", it is also used to say "Somehow"
I threw a rock at his window, but smh he paid me a drinkthey betrayed us and gave the meth to the other gang, but smh it's no surprise