I had a similar experience recently. After my morning feeding, I would get a sharp pain that would last for hours. It was so uncomfortable that when I got that pain, I always thought of weaning my son. The only relief I got was when I nursed him again. My doctor prescribed antibiotics in case it was thrush or something else going on inside the breast that she couldn't see. I found the antibiotics made no difference.
I found that if I latched him on and squeezed my breast as he latched on to form a great latch, I wouldn't get this pain. It was almost as if, after 9 months of nursing, he forgot how to latch properly. I did this a couple of times, and I haven't experienced the pain since.
I wish you luck on finding the cure for yourself.