Sounds like a vasovagal reaction OC.
Holding your breath during a heavy lift increases the blood pressure in your neck and head.
BP sensors at your carotid senses the increase in pressure and tells the heart to slow down and the blood vessels to relax.
The drop in heart rate/vascular resistance drops the brain perfusion momentarily and BAM you feel like you're going to pass out, or you do pass out!
Holding your breath in your gut, allows you to use your diaphragm as a natural thoracic brace(think lifting belt). It keeps all of your organs and muscle tissue in the core locked in by using counter pressure and ultimately aids in locking in the lever that you are using your back as.
I read up on it after almost passing out after my DL's too lol
Deep breath into the gut, lock your core, it allows for counter pressure to be put on the diaphragm/internal organs - rather than being held up high in the lungs causing pressure on the vegus nerve - which in turn causes you to feel like you're going to faint or pass out.
When lifting heavy - Inhale deeply to the gut, lock your core.. lift the weight.. replace the weight...and exhale.
It's a common thing I believe OC, you're definitely not alone