dac,
It looks like you have a paronychia, or infection around the nail. The pain probably decreased when it started to drain, which relieved the pressure. You also have cut your toenail very short. Most podiatrists recommend that it be cut straight across at the end of the pulp, or just a couple of millimeters shorter.
Keep the area clean with soap and water. But, if it gets more swollen or the pain comes back, you might need some antibiotics or drainage of the abscess (or both). If that occurs, you probably need to see your physician.