According to social psychologist Stanley Schachter
(1959), increase in anxiety would cause increases in the
desire to be with others i.e. the need for affiliation.
In his experiment the participants were told that they would be
participating in a study on the physiological effects of electric
shock and they were be at the receiving end.
However half of them were warned that the shock would be very
painful i.e. the high-anxiety group while the
other half were told that the shocks would be mild or even painless
i.e. the low-anxiety group.
In reality, no one was going to receive any shock at all. 
While waiting for the experimenter to prepare the shock apparatus,
the participants were asked if they would rather to wait alone or
in the company of others.
Result: The percentage of people who wanted to wait with other was
nearly twice as high in the high-anxiety group than the low-anxiety
group. Increased anxiety usually led to increased
affiliation.
Schachter, S. (1959). The psychology of affiliation.
Stanford, CA: Standard University Press.
What do you think? Does it apply to you? 