Loneliness is a state of mind. Sometimes we feel it even we are in the midst of a crowd. We have to consciously get out of it by concentrating on hobbies etc