Being resolved to be the man Mary deserved and the man she already saw him as is the right way to honor her memory. If we don't strive to be better for the people we love, then we're not doing this "Life" thing properly.
Sherlock's consolation was utterly beautiful and appropriate as well. He didn't handwave what John did wrong, but simply reminded him, in a kind way, that mistakes are easy to make and that it could have been much worse. Which is exactly what someone who tends to mentally abuse themselves needs to hear. Absolutely loved it.