Hi,
Thanks  for  your query.
After going through your suffering, it could be due to 
gout. The remedial treatment for gout includes -
1.Pain killer like 
naproxen, 
Ibuprofen .along with short course of 
cortisone.
2.Drugs which lower the uric acid like- 
allopurinol and 
febuxostat.
These are prescription only drugs so you may have to contact your local doctor. 
In addition to medication, the following suggestion may help to reduce pain--
1. Ice fomentation- If the pain is not severe, try 
cold packs or cold compresses on the joint to lessen the inflammation and help the pain. Ice the joint for 20 to 30 minutes several times a day.
2. Rest the joint.-. Raise the joint if you can on a pillow or other soft object.
3. Plenty of water -A lack of water in your body can makes your uric acid levels raise even higher than they already are. Drinking water will help your body stabilize uric acid to a normal level.
4 Dietary advice- The Purines, which are chemicals found in some food, when they are taken in food are broken down into uric acid. A diet rich in purines can raise uric acid levels in the body, Meat and seafood may increase your risk of gout. Dairy products may lower your risk.
I do hope that you have found something helpful and I will be glad to answer any further query.
Take care