Have you had a chat with the health visitor or your local breastfeeding advisor/lactation consultant?
The La Leche League website may also be useful, as they have loads of troubleshooting and information leaflets.
www.laleche.org.uk/unhappy-baby/
There is also the breastfeeding network which may be of use too:
www.breastfeedingnetwork.org.uk
Be very careful introducing formula - baby may not take it for a start, or it may upset his tum even more - there may already be some intolerance which may not be settled by or may be exacerbated by formula.
Also, I would definitely say don't be tempted by hungry baby formula - it seems like a bit of overkill at this point. Hungry baby formulas contain higher levels of casein protein and whey which is hard for babies to digest, so the idea is merely to keep your baby's tummy fuller for longer, however there is no evidence which says that babies are more satisfied or settle for longer than with other formulas. It's more of a gimmick to encourage people to buy in hopes of a quick fix imo.
If you did decide to go with formula, you could look at the first steps nutrition trust website which can help you to decide on a particular formula if that's they way you wanted to go.
www.firststepsnutrition.org.
And I'd also say that if you were to mix feed, you'd still need to be doing those overnight feeds to ensure your supply continues as lactation hormones are higher overnight. Introducing formula will have an effect on the amount that you produce and you will likely find that your supply dwindles quite quickly if you're supplementing with formula, so do be prepared for that if you do use some formula.
Personally I wonder whether the discomfort at the breast is down to an underlying cause rather than baby just being too hungry - as you say, he's gaining weight and is only difficult late evening/night time, have you thought of getting him checked for reflux or lactose intolerance? Some babies do have an intermittent lactose intolerance which resolves itself eventually. May be worth a look into?