While it's too late to save face, the President and CEO of HP has come forward to issue a public apology for the companies actions in spying and pretexting their employees. Some of the actions were downright illegal, though others were just "morally objectionable". Prextexting, for instance, is considered a crime in California, where most of the legal action is taking place:

California Attorney General Bill Lockyer said pretexting, the act of pretending to be an account holder to obtain phone records, is illegal in his state. Federal laws are less clear, but that has not stopped the U.S. Department of Justice from looking into HP's role in pretexting.
The CEO may have a point in that the leaks which prompted them to take the actions they did were hurting the company, though in retrospect this has probably hurt them a lot more.