There are two ways to purchase an electronic iTunes Music Store gift certificate: through the Apple Store, and through the iTunes application itself. Never, ever, do it through the Apple Store.
If an e-mailed gift certificate you purchased through iTunes is accidentally deleted, inadvertently tagged as spam, or otherwise lost, voiding and re-issuing it through the iTunes application is trivial. If the same thing happens to a gift certificate you purchased through the Apple Store you are, not to put too fine a point on it, shit out of luck. You will have to contact Customer Service by e-mail and detail your woes, after which they will credit your account with the amount spent and you can try again.
I have to admit that I expected better — much, much better — from a company which has made usability a cornerstone of its brand.