Make sure you've had enough to eat and enough sleep before you go to your workout, don't go on an empty stomach, get some carbs first. Sleep and food are usually the two reasons why people pass out. If you feel like you're going to pass out, either lay flat on your back somewhere (maybe on an empty bench) or sit down and duck your head, just try to get your head level with your heart. Something else that it could be is that you're coming up and going down too fast on the deadlifts, like you're kind of jerking. Do them kind of slow and deliberately. You can come up fast, but go at too high of a speed. Just lift, then set it down, no need to go fast paced if that's what you're doing.