I had seen that mainsprings can be repaired when the end snaps off like that. I have never done it. However, that mainspring looks pretty well "set", and may not be applying optimal power to the train. However, if there is still good resistance power to the MS, and you did repair the end, it may just become a 7 7/8 day watch. A new spring would be best, but the lesson learned in repairing such a spring would not go to waste.
With a mainspring gauge or digital calipers you should be able to get the dimensions of the size you need, i.e, thickness and width. You can stretch the spring out along the edge of a table or desk with a tape measures, or(?) to get the length. When you do this, wear eye protection, and be sure nothing is around that can be damaged if the spring takes flight on you. Good luck.