Oh sweets, it is soo difficult when things aren't going well, and energy sapping as well. We have all had moments of wanting to give up, but please be assured that the problems you are having are fixable
Have you seen a breastfeeding counsellor? or spoken to one? On one hand, it's bad that he isn't gaining weight, but on the other, he isn't losing so he is obviously getting something. What can happen though is that babies who aren;t getting enough sleep more to conserve their energy and you get into a viscious circle. Is he producing lots of wet and pooey nappies as well?
If feeding has been hurting, it's almost certainly because his positionong and/or latch just isn't quite right, and you perhaps need to look at both of those to try and correct it. Even a tiny alteration in his positioning can have a huge effect.
the shooting pains in your breast; could it be a blocked duct or the onset of mastitis? Are there any sore or red areas on your breast? If his latch isn;t perfect this can cause problems with blocked ducts.
It's also possible that it's thrush and you need to check for signs of it on your nipple or in the baby's mouth. If his mouth is sore, it's going to make feeding more difficult.
Another reason for the latch and pain could be that he has a tongue tie. do you know if he has been checked for this?
sorry to ask so many questions.
If you haven't done so already, I would suggest that you call one of the helpline numbers; you will speak to a qualified breastfeeding counsellor who should be able to out you in touch with a local counsellor who will come out to see you if needed. The numbers are here. NCT tend to have the biggest coverage ime.