This is not meant to be a formal definition of SMH like most terms we define on Dictionary.com, but is rather an informal word summary that hopefully touches upon the key aspects of the meaning and usage of SMH that will help our users expand their word mastery....
It stands for "shaking my head" — meaning, the person who sent you that message can't believe you/the situation right now. Depending on the context of the conversation, the term can give off vibes ranging from "I'm confused" to "WTF?!" ...