Not much you can do but wait for it to pass. Someone once told me to pinch my nose and blow out, like when you try to "unpop" your ears on an airplane. That's never worked for me, though.
It sucks man, but you just gotta get through it. The pain will subside through the night. If you can make it through today you should wake up tomorrow feeling alright.
Blue Balls is really a muscle spasm in your goon area and do not have anything to do with your scrotum actually. They occur when you are turned on, or excited for a long while without a release and the muscles get tired and set into a spasm that has to reside over time. They won't kill you but they are a pain but a soak in the tub might help. If you still watch porn and are erect for quite a while they will occur.