The probability that your vote matters can easily be modeled with a binomial distribution. In any of the large-scale elections you seem to be referencing, that probability will be vanishingly small.
But the expectation value may be much larger; http://works.bepress.com/cgi/viewcontent.cgi?article=1046&context=aaron_edlin has the argument (crucially dependent on the fact that your probability of breaking an exact tie is of order 1/n). I don't buy their argument that people actually think that way, but the expectation calculations seem sound.
At a Foresight Gathering some years ago, a Congressman was in attendance, and he spoke to us and said the following:
Many hands went up.
Fewer hands went up.
Rationalists would likewise do well to keep this lesson in mind.
(I should also mention that voting is a Newcomblike problem. As I don't believe rational agents should defect in the 100fold iterated prisoner's dilemma, I don't buy the idea that rational agents don't vote .)
(See also Stop Voting For Nincompoops. It's more applicable to primaries than to the general election. But a vote for a losing candidate is not "thrown away"; it sends a message to mainstream candidates that you vote, but they have to work harder to appeal to your interest group to get your vote. Readers in non-swing states especially should consider what message they're sending with their vote before voting for any candidate, in any election, that they don't actually like.)