very sore bum

My baby is almost 7 weeks and he's had a sore bottom since he was 2 days old.
We have tried metanium, bepanthen, sudocream, timodine, medihoney and lots of nappy free time. Some days it looks much better then the next day is awful again. He cries and wriggles about all the time during nappy changes :(
I'm in the process of phasing out breast feeding and giving him formula due to tummy ache and constant vomiting. I am wondering if my breast milk has this affect on it tummy weather it's causing his bum to be sore each time he has a poo.
Please does anyone have any advice??? I've seen doctor twice and both times they been useless.