Using a combination of four studies, scientists have shown that television shows can instill a sense of belonging in people with low self-esteem who have been rejected by friends or family. This is called the social surrogacy hypothesis, which figures that in order to fill the emotional void of social deprivation, a person will establish relationships with fictional characters (as teenagers, many of us had a similar type of relationship with late-night Cinemax).
One study showed that subjects who were experiencing feelings of loneliness felt better after turning on their favorite television programs. Another had subjects writing essays about either their favorite shows or some other random subject as a control. The subjects who wrote about their favorite shows used fewer words expressing loneliness than the control group.
The article is surprisingly SFW. Link