Sprained finger

My middle finger suddenly got really swollen around the joint area where it meets the hand and I can't think of any reason to cause it but it's really weird because it goes and comes back randomly. It kinda feels like someone is pulling my nerves through my arm and it's really painful can anyone help me I'm not sure what to do or if tomorrow it will be fine. Thankyou☺️