The insomnia you're describing sounds similar to something I suffered from when I was around 13. My regular sleeping pattern was stupid, going from around 1.30am till 6am. I was tired all day, and my grades in school dropped dramatically. Whilst you seem to be suffering from a more extreme case, I found (as most people have suggested) listening to music quietly in the background whilst you try to sleep. Also try doing something simple such as changing the direction you sleep in, with your head where you feet usually are. As for the panic attacks, I still do suffer from them where if I get nervous, even for irrational reasons that my mind knows are pathetic, my whole body physically shakes and I have next to no control over it for periods of up to 10 minutes. The only advice I can give on this is to consult a doctor, which I've yet to do.