It depends on the person, really. Some thrive on the company of others, some prefer to be by themselves. But good ways to prevent loneliness and sadness are not to isolate yourself; talk to others once in a while whether on the phone, through text, or online. Find hobbies to keep you occupied, learn something new, take walks outside, discover new music, new books, more art, drink tea, eat fruits and vegetables, go out for coffee or to a museum even if it's by yourself. Don't be embarrassed for keeping yourself company. Try something new and maybe have an adventure or two. Sorry for the verbose response but these are a few of the things that make me feel good