Panic arising in meditation I am a relatively new (about four months) meditator. 

My meditation technique is closing my eyes and focusing on the sensation of the breath as it passes in and out of my throat. Today I was meditating for 30 minutes and, as often happens, I saw swirling lights in the darkness of my closed eyes. 

As I became more deeply focused on the breath-sensation, the lights went away and there was darkness, but the odd thing was that the darkness extended - it seemed as though I was looking down an endless, dark hallway rather than just looking at my eyelids. 

As I noted this, I started to see a purple, vibrating orb appear. I remember thinking to myself that maybe I was about to have some kind of mystical experience. I became a little excited about this, but all of a sudden the excitement morphed into an incredible fear. My breath began to come in gasps and was shaky, and my heart was pounding. I eventually managed to calm down, but wow that was strange. 

So my question is - has this happened to anyone else, and is there a reasonable explanation? I have always had issues with anxiety, so I wonder if that is related to this experience.

I have heard that meditation can be harmful - is this a sign that I should refrain from meditating?

Thanks for taking the time to read.
Ian
welcome!

Generally, from Buddhism standpoint, meditation is not practiced for the sake of mystical experiences. In vipassana exercises, whatever sensation is felt, it's supposed to be observed, we are not supposed to be overwhelmed by it. In general, arbitrary sensations and imaginations are not to be stimulated. And as importantly, awareness should be constant: when one embarks in sensations and imaginations, awareness is lost. 

If awareness is lost, whatever imagination inside your mind becomes powerful, your forget that you're safe, sitting comfortably, and believe you are in danger, when nothing will really happen.

I remember reading an account of a meditator who described having visions during meditation, and later on, seeing his visions were true. He brought this to his teacher who told him to not be distracted by such small thing. That's a valuable attitude to have during meditation. At least if one is aiming for the higher goals.

In general also, if the meditator is not calm (if he is excited, in fear, tired, etc), meditation is impaired:


  But with excessive thinking and pondering I might tire my body, and when the body is tired, the mind becomes strained, and when the mind is strained, it is far from concentration. So I steadied my mind internally, quieted it, brought it to singleness, and concentrated it. Why is that? So my mind should not be strained.
  
  -- Dvedhāvitakka Sutta [Bodhi trans.], MN 19


So, to answer your questions:


This is relatively common, specially when our minds follow patterns that easily lead to strong sensations. A remedy for this is having a very good understanding of the practice (for example, understanding very well the five hindrances)
A lot of things can be harmful if not done properly. Though meditation doesn't seem to require knowing much, it can be very hard to do it without study.


From here, I suggest having a good understanding of primordial sources for this practice: the Satippathana Sutta and the Anapanasati Sutta where the Buddha explains their techniques. I also strongly suggest looking for books that cover detailed explanation for these. Finally, there are a lot of questions regarding meditation here, I suggest looking up for those as well.