I can only remember once. I have had close calls before (all from leg workouts). Heavy squats, then heavy leg press, then hack squats, and to finish off with leg extensions makes anyone queasy.
The one time I almost passed out, I was 19 years old. I had been training legs for about 3 months hard. I decided to try a 20 rep squat workout. It's the type of set where the weight is heavy, so that you can only do 12 reps, but through rest pause/breathing you are able to grind out 20.
I chose 225lbs, heavy for me back then. After the first 10 reps I was breathing hard and pretty fatigued. After 15 reps I could barely breathe and my knees were buckling just standing. In my mind I just kept telling myself I have to finish this set, if I don't finish I will be a failure. No women will like me, I will have no friends, my family will be disappointed in me. I just kept running these things through my head.
Closing in on 20 reps I dropped down into the squat position each time for my rep and was just hoping and praying that I could get back up. It took every ounce of anger and motivation I had to continue. My body didn't complete the set, the fear of failure did. I finally reached 20 reps and racked it as fast as possible and once I did I fell to ground and laid there. I was completely exhausted. I was seeing stars and getting tunnel vision, so I closed my eyes and focused on catching my breath.
I knew this was going to be one of those sets you remember and think back on when you need some inspiration to work hard. I think it was legitimately the first time in my weightlifting career that I gave absolute 100%.
After that set I cleaned up the weight and went off to leg press, lol. Well, that's the one time I can think of when I collapsed.