Jocasta first becomes uncomfortable when Oedipus tells her of his dilemma and the oracle's prophecy. However, it is when the messenger arrives with news of the death of Polybus that the pieces really begin to come together for her. After the messenger reveals the Polybus and Merope were not in fact Oedipus's birth parents, her initial fear of the oracle's prediction sinks in as reality. As the messenger tells them of the story of how Oedipus came to live with Polybus and Merope, he tells Jocasta that she can identify the servant who had delivered the injured baby to him. When Jocasta hears this, the truth becomes unavoidable.
To answer the question of why the reaction and what leads to suicide, you have to consider three things. This is a woman who gave up her child, something which has caused her guilt and something I believe she did regret. This is also a woman who now realizes that her son unwittingly killed his father, which brings tremendous guilt to bear. Finally, there is the ultimate realization that she has been living as man and wife with her son. I think this is the one realization with which she cannot bear to live. For her, suicide is the solution.
Sophocles is using suicide as the ultimate sacrifice to atone for sins he felt were so grievous that there would be no way to live with.