I had to get that done once. I'd heard that the pain, though brief, is of comparable intensity to childbirth. So I took a tincture of cannabis about an hour beforehand. (I made it with about a gram of bud --legal where I live -- sauteed at low temp in about 30 ml of butter. Then fried a thick slice of bread in it, taking care to soak it all up.) I laid there on the table and did some 4-square breathing and took it like a champ.
The doctor, a woman from India, was amazed at my serenity. She asked me if I'd taken anything for pain and I told her that I'd taken tincture of cannabis and done a breathing exercise. She replied,
"Very smart! I wish more people here knew about that."