I think he posted it because he now believes she was mentally ill. I think it's the only way he can reckon all of this mess.I think exactly what you stated. She told her ex that to rationalize a behavior.
However, JH could be posting that just to post it, lots of people put things on social media just to make a statement, not related to their lives. Or pehaps he's concerned about his own mental health? Or he could have been suspicious of her mental state even previously - all he said was he had no knowledge she'd been diagnosed with anything.