South Carolina attorney resigns, enters rehab after being shot in the head months after deaths of wife and son