Lots of people will do a lot to avoid feeling negative emotions. But researchers are figuring out how these unpleasant feelings actually have benefits.