I think you are on target with there being a need for something like a holodeck on a ship. Lack of nature, cramped quarters, boredom and other factors can contribute to depression. I know for myself just getting sunlight in the winter can help my mood. And, I'm sure for some people a holodeck could help quite a bit with loneliness. Still, we should distinguish between loneliness and depression. Loneliness is usually a result of loss of interaction with people. It seems to me that interaction with real people is the best cure for that. If that is not available, I would certainly take a holodeck as the next best thing. I can't help thinking of Wilson in "Castaway".You’ve never been stuck 70K light years from home without knowing if you’ll ever SEE home again.
I can only speak for myself, and I have to acknowledge that I never tried a holodeck (because they don't exist yet), but for me, if I'm lonely, I will seek out other real people. If I'm depressed or bored, I'm heading to the holodeck fast.