Sounds good. However, I'm concerned about getting the tone right. If not said just right, "of course" can sound patronizing or dismissive, as @Simon Clifford said.
I'm autistic. Like many autistic people, I have to deal with the paradox of hyper-empathy and lacking the proper social skills to express this empathy in appropriate ways. (This paradox leads to shutting down and feeds into the stereotype that autistic people lack empathy.) Another autistic trait I share is an odd voice, with little inflection and a certain rhythmic quality, almost like I'm chanting instead of talking, particularly when stressed.
EDIT: Maybe a better phrase of affirmation / support could be something along the lines of "I hear you" or "I feel you." Then follow with @Jolinda Kohl's suggestion, to ask if there's anything I can do to help.