In addition to the reasons outlined by wannam, we can say that there is a symbolic reason for Oedipus blinding himself. Oedipus has until this point been metaphorically blind, dealing intemperately with others, heaping scorn on the blind prophet Tiresias, accusing Creon of trying to bring him down, and so on. In a word,he has been guilty of hubris. But now when faced with the shattering revelation of his own crimes (committed albeit unwittingly), he at last sees the truth, the horror of which is insupportable. Now he is no longer blind in a figurative sense, but he inflicts a self-punishment that renders him physically blind. In this way he becomes more akin to Tiresias, the wise, blind seer who warned him and who made a prediction:
Blind who now has eyes, beggar who now is rich,
he will grope his way toward a foreign soil,
a stick tapping before him step by step.
This refers to the dethroning of Oedipus and his looming exile. He himself is the pollutant of the land, which he sought to eradicate; so now he must leave.
Oedipus's self-blinding, then, is symbolic as well as literal. It is a kind of poetic justice, and it also fulfills Tiresias' earlier prediction. Also, we might add that he does not commit suicide like Jocasta because he has more mettle. What he has learned is unendurable, yet he does find the strength to endure it. In fact, in Oedipus at Colonus, the sequel to this play, he regains something of his old fire and authority even in exile; he becomes a kind of oracle himself, and in the end is called home by the gods.