Magwitch, the convict, was instrumental in shaping Pip's success. Pip has no idea. For the longest time, Pip assumed that he was being shaped into a gentleman by Miss Havisham so that he could become Estella's equal. It was actually his kindness for Magwitch back when he was poor that made him into a gentleman. As Pip become comfortable in the world of the gentleman, he lost part of who he was. By remembering Magwitch, he is recognizing that he is not the same person. That act of kindness, which then had an impact on the rest of his life, is not the person he is anymore.
Even though Pip does not realize that Magwitch is responsible for his becoming a gentleman, he realizes that life is not as easy as he thought it was going to be. Pip regrets who he has become subconsciously, and by remembering Magwitch, Dickens is reminding us that Pip has not become the person either of them expected. Magwitch thought he was helping Pip by making him a gentleman, and Pip thought he was set for life. The reality is different.