I agree with the arguments of Henry David Thoreau and of Lysander Spooner to the effect that voting is fundamentally an immoral act. To vote, above all else, is to broadcast your own acceptance of the outcome and willingness to abide by it. So from a moral perspective, I should only vote if doing so has a sufficiently strong chance of averting some even greater evil.
But setting morality aside and just assessing the expected value, I should want to vote more when the expected value is large, which is to say when I have BOTH (a) a decent chance of affecting the outcome, AND (b) some good reason to think my vote is much better informed than that of the average voter.
If - case (a) - my vote is one of millions, I have no reason to expect it to CHANGE the result.
If - case (b) - my vote isn't above average in terms of how well-informed I am and how carefully I've thought it through, I have no reason to think adding mine to the mix will IMPROVE the result, even if it DID change the outcome.
For most people and most elections most of the time, neither (a) nor (b) applies; they should not vote.
Your last paragraph suggests the use of Kant's categorical imperative, which not a great guide to action. To illustrate why: suppose our question at hand is "should I walk on the grass?" If I do, I will enjoy the feeling of grass between my toes, but if EVERYBODY walked on the grass, the grass would die and we would lose not just its usefulness and that nice feeling but also its beauty. So applying Kant says I shouldn't walk on the grass, right? But wait! There are more likely options in the world than EVERYBODY or NOBODY should walk on the grass; there's also the option that SOME people walk on the grass. If we test the rule "people SUFFICIENTLY LIKE ME should walk on the grass", that works fine when you universalize it! Then we get the prettiness for all AND the nice feelings for some and the grass survives.
So to return to voting: not everybody should vote. SOME people should vote. Which ones? People who really ENJOY doing so, and people who have reason to think it will be a close race AND are especially well-informed or otherwise have reason to think their vote helps much more than average.
I'm in neither of those categories, so I shouldn't vote.