Wow, this didn't even occur to me. I'm not sure if you were just joking or being serious, but this is probably the best solution to the OP's problem. Let's see...the spud said:Masturbate.
I am surprised that I am the first on to reccomend such actions to be taken.
Heartbroken? Check.
Boredom? Check
Late at night/Can't sleep? Check.
Simple. Rub one out and go take a nap. Feel better in the morning.