When something tastes like vinegar, i.e. The pickle taste, it's usually because the mayo has expired. I don't know what the sandwich was, but mayo can taste funny and metalic-tasting when it's getting old. If you're not sick and you're not craving the same sandwich again, then I would pitch the mayo and maybe whatever you made the sandwich out of. Give it the sniff test. =)
Well its either because your mayo is expired, or you are deficient in either vitamin A or C.