No, I never have ejaculated accidentally in the doctor's office, but there were at least two times when I wish I had! I had become so physically aroused during my session with the doctor that getting myself to ejaculate was my first priority as soon as I could after leaving.
The first time was when I was a young teen-ager, maybe 14 or 15. I was having a complete physical done by a doctor who was not my usual MD. He and I were alone in the examining room and I was surprised when he had me take off all my clothes and had me lie down on my back completely nude on his examining table. I relaxed and let him go about his work of poking and pressing at me, starting at the top of my chest and going back and forth, each time a little lower down. By the time he started going back and forth below my belly button I started to feel stirrings in my penis. I wasn't embarassed but I was surprised and continued to be relaxed and to lie still. As he went further and further down I became harder and harder and finally I could feel my penis bobbing up and down with each heartbeat, that's how aroused I was! The whole thing was new but I didn't have any preparation or experience to compare it with so just accepted the goings on from an authority figure. Just when I thought I couldn't take any more of his poking without shooting a load he had me roll over onto my stomach while he did the same poking to my back. Eventually my hard-on subsided and it was gone by the time he was through although the tingling in my penis remained until I was able to get home, go to the bathroom and masturbate.
When he was through he left me to get dressed while he talked with my parents. Later that day my father told me while beaming with pride that the doctor had told him that I had developed into "a fine young man." So, I thought, the doctor had told him all about my bobbing erection and possibly it was part of a physical development test -- to this day I'm still not sure why it was done. But I do remember that I enjoyed the experience, why wouldn't I?
The second time I can say I wished I had ejaculated in the doctor's office was about 30 years later when I was having a digital rectal exam from my regular doc. His method was a little different in that he would lubricate his gloved finger and hold it still while he had you back your butt onto it, leaving the patient more in control. That one time I slid my rectum over his finger which easily slipped far inside. As he started to feel my prostate I was filled with an incredible amount of desire to ejaculate. "I want to masturbate, and I want to masturbate now!" I remember thinking to myself. Again the driving need didn't go away with the end of the exam but this time I was older and didn't feel I needed to wait until I got home. On the way out I stopped in the men's room and left my load of semen there. Felt much better after that.
Maybe the third time will be the charm - maybe my time to shoot a load in the doctor's office is down the road, something to look forward to. At least should it happen I'll know that it's not really something unusual. That's how we guys are made and those things happen sometimes.