Solitude is the work out, loneliness is the body pain that one gets out of it.
When starting out, small periods of solitude can bring out the pain of loneliness. But like a work out, solitude can be extremely healthy for the mind. It has benefits that one cannot find in the company of others. The lengths of solitude are best increased gradually. The idea is to not avoid loneliness altogether but not get in a situation where it can overwhelm the mind entirely. A body writhing in pain will have trouble in walking, let alone in performing taxing activities, so is for the mind