In Lord Jim, Jim's entire story, as told by Marlow, is all about coping with guilt, shame, remorse, and regret. Jim feels guilty, sure, but we also come to understand how his guilt and shame affect his community. Marlow often describes himself as ashamed or embarrassed on Jim's behalf. Brierly, Stein, and others also express their horror over Jim's actions, which seem to have brought some sort of damning guilt down on the entire seafaring community. For much of the novel, Jim tries to overcome his guilt and move on with his life, and at the end, we're left to decide if he succeeds.
Jim's guilt gives him a deathwish for the bulk of the novel, because death seems like the only way he can escape his past.
Jim has gotten over his guilt about the Patna incident by the time he goes to his death on Patusan, so that moment is really all about making up for the death of Dain Waris, nothing more.