I think eating right, getting sleep, keeping hydrated, etc. is definitely important.
Getting tattooed, though, can be a heavy experience mentally, and I think when you're nervous, you might forget to take deep breaths or breathe at all and be physically very tense, which could very well make you feel like you're going to faint.
The first time I got tattooed, I got my elbow done, and I was nervous and not breathing. I was turning green so the tattooist told me to take a break.
Call me a hippy but meditating or doing some yoga before hand might be helpful.