Well, bruises and such it is RICE: Rest, Ice, Compression, Elevation. If it's a throbbing kind of pain, I bet elevation will help. Sit down or lay down and put your hand in a comfortable position higher than your heart. General soreness I think is best relieved by Tylenol, which is more of a pain blocker than anything. It tricks your body into not feeling the pain. If it's swelling that's causing the pain, then both elevation and some ibuprofen, and maybe some ice too.
I hope you get to feeling better quickly.
That finger that I smashed a few months ago is still kind of numb. I don't think it's ever going to be sensitive again, so I'm learning to compensate by paying attention to the pressure on a pick against my thumb instead of against my finger's knuckle like I used to. The nail is getting ready to fall off, but there's a new one growing under it already, so I think it'll be OK. These sorts of inconveniences let us know that we're alive.