You could have a bruise
in the muscles in the area that you hit with the hammer which would explain your symptoms. This should improve with time. If you have any numbness
in your thumb or fingers its possible you have an acute carpal tunnel syndrome
which may also cause pain in your forearm. Fractures
of the thumb or index metacarpal bone may also cause such symptoms and could be diagnosed on an Xray. I would take a regular anti-inflammatory drug for such a problem and if it continue seek medical attention.