It sounds to me like he's acting out of instict, the 'whole fight or flight' thing. Did he have a safe, enclosed place to retreat to on these occasions? I should imagine he's come to assossiate humans with negativity after his operation. It's going to take a while to restore his confidence in people, but you can do it. Here are some pointers:
1. Don't shout at him when he attacks - it'll just make him more scared and he'll be even worse after that.
2. Make sure he ALWAYS has somewhere safe to go hide. A cardboard box turned on it's side is good - make sure there is always one for him in the designated place once you've put one down. Keep the cage door open (I assume it's at floor level?) at all times when he's free-ranging, as this is probably where he feels safest.
3. Spend loads, and I mean LOADS of time down on his level. Literally lie on the floor, and let him come to you. Hand feed him treats, talk to him softly, even let him jump on your back. It's very important that you do this to show him he needn't be afraid of you.
4. Don't pick him up at all unless ABSOLUTELY necessary! Train him to come when called using his favourite treats, and use this method to get him back in his cage/in the carrier etc.
5. Be quiet around him. I don't mean a complete dead hush, but no blaring music, tv shouting kids etc. Buns have very sensitive hearing and any sudden or constant loud noise may well add to his distress. Talk normally when you're just in the room with him, but maybe lower your voice a little when you're down near him.
6. Avoid cleaning out his cage while he's in it. Buns can be very territorial, and it's not suprising really when you put yourself in their furry little shoes. Imagine a giant hand appearing through your ceiling and churning your furniture about!
7. Get him a friend. Buns are social animals, and a good bond with another bun should help him feel much happier, and more confident. A local rescue may well take care of the bonding for you.
8. Be patient. He will calm down a lot in time (my Pickles was a killer-rabbit in his youth!) and if you follow these basic steps I expect you'll see the difference pretty soon.