If you have trouble playing against Zed in mid lane then try taking barrier or exhaust.
If you take exhaust, when he ults onto you, as soon as he becomes visible hit him with exhaust. This will substantially reduce the amount of damage he does to you during his death mark, which will reduce the amount of damage that hits you when his death mark pops.
If you take barrier, when he ults onto you, say "one mississippi" out loud then activate barrier. This will make sure that it is up when his death mark pops.
As others have noted, if you are on an AP caster, you can rush seekers into Zhonyas.
If you are really having trouble with the match up and looking for specific counter picks, Kayle is traditionally considered THE anti-zed, as her shield can completely counter Zed's ult. In lane, it keeps her alive, and later on, it keeps your ADC alive.
Lulu works similarly, as her ult can give whoever Zed ults onto a big infusion of HP.
Annie also has a great matchup against Zed, but it's a bit less fool proof, as if you don't have your stun available when he death marks onto you it can be trouble.
Swain, Vlad, and Morde all can be really hard to kill, which works well enough against Zed.