Sometimes it really pisses me off when people say Ace was foolish for running back and fighting Akainu
I think that is just the character he is, he values the reputation of people he respects/his saviour more than he values himself. In fact, Ace's wish was to find a purpose and a reason that his life is worth living since he hated himself because of his bloodline. It is people like WB and the WB crew that gave him this purpose and defined who he is. They showed him that they are willing to brave Marineford against all three admirals, on a risky mission where sacrifices are inevitable, just to retrieve him.
As a result, Ace was furious when Akainu insulted WB because WB is more than just his captain. It is a person that gave his life a meaning. Especially when WB was about to die, Ace would regret it in the future if he didn't do anything about Akainu shittalking WB in Whitebeard's last few moments.
And I think people need to realize that Ace knew he wasn't going to go in, bitch slap Akainu and leave. He wasn't planning to kill Akainu but to get him to shut up. What he didn't realize was Akainu would sneak up on Luffy instead
He also isn't the only character that fought people for badmouthing their friends. Shanks did the same thing in chapter one - even though it was against Higuma who was a fodder - , but Luffy also defended his crewmates so many times when people badmouthed them including against Celestial Dragons, Cracker, Arlong....etc
The fact that Ace turned back to fight Akainu made me appreciate his character more. It resonated with me because it takes a lot to have a person who has the courage to take on the world to defend someone else's reputation.