This is something that I always seem to struggle with every now and then. Sometimes I get lonely and feel like I may be depressed, and personally I don't have solid advice for these things. We all go through these things in our lives, and it all depends on how we try to take care of them. Everyone has different methods of dealing with it. Some draw, others go for a walk or exercise.
Involving yourself in a hobby you enjoy may help, anything to busy yourself with something that gets you feeling better or lift your head up and say "Hey, this makes me feel good," As long as it isn't anything harmful to yourself or others.
Personally I just try to power through it. Maybe put on a game or watch TV to distract myself from these feelings. Even going to work helps. I don't always find the means to get my mind off said feelings, and often I end up lying in bed doing nothing drowning in said feelings, but I always get up and go "tomorrow will be better" and it's what keeps me going. IMO you don't always HAVE to have something every time, but the point is never let those feelings drag you down to the point where you can't/won't do anything.