He says he takes it as prescribed against occasional depression.
Knowing some folks who are working with their psychiatrists on their mental health and using ketamine under supervision: it seems ketamine is starting to prove effective for depressive issues.
The challenge is it's extremely potent and the dose is extremely patient-dependent. Miss a dose, mis-dose, or fail to realize you don't have the calibration right yet, and the risk for side-effects is high. Depression itself can also mask other conditions (like, counter-intuitively, mania; when you're too depressed to be manic you don't show the mania symptoms) that only surface for potential treatment when the depression is treated.
Most importantly: Musk can afford the kind of calibre of psychiatrist (and the time for observation) necessary for the therapy to be maximally effective. So if he's working with someone and serious about being treated, I wouldn't doubt ketamine therapy would be on the table.
(All of that having been said: mixing marijuana and ketamine is risky as hell; if Musk smoking on Rogan wasn't a one-off, he's doing his psychiatrist no favors introducing a second drug to his system that interacts with the same neural pathways and can create overshoot and bounce-back effects).