The first steps to treating such an injury is icing and elevating the finger. Ice the injury for 15 minutes and then remove the ice until the finger temperature returns to normal.
Then repeat the process. After the swelling decreases and the pain subsides, try to move the finger very slightly. If the injury is mild, you will be able to move with little discomfort over a short time.