Long time insomniac here. The best thing is to just learn not toget all freaked out and frustrated because you SHOULD be sleeping, but you can't. That only makes it worse by adding extra stress.
I've personally found that getting into a routine to help gradually wind down before my target bedtime works best for me. Since I try to go to bed some time around 1am most nights I try not to allow myself to get on the computer after 10:30. Surfing the web or playing games requires thought and interaction on my part and keeps my brain stimulated. Watching TV requires very little thought or interaction so I usually plop down in front of it late at night. Instead of watching first run late night shows like Letterman or Conan O'Brien (where there might be something/somebody new I want to see) I usually stick with the late night reruns of shows I've seen before. That way I'm not as concerned about seeing a whole episode of something. Same thing with watching movies I've seen before a dozen times. I can just feel free to doze off at any time and usually do.
Reading also works well for me peronsally given my increasingly short attention span. And if you want to bore yourself to sleep, watching the Research Channel (if you have that) is just like being in a dull college lecture hall most of the time.