the unconscious need for punishment is aptly named, because the person can be punishing themselves but they can also be punishing someone who loves them by hurting themselves.
There invariably becomes a point in the conversation in which the person reveals that he intentionally put himself in danger, at risk, or stayed in a bad situation.
For some people you have to ask how does it feel if you say "I don't deserve a good life/security/to be alive/etc.?"
Make sure that you tell them about ambivalence and how it pertains to the self as much as to objects and that although there are some healthy parts/drives in every person what concerns you is the dark side, the ugliness, the detached parts, the weak parts, etc. This always take some time with some people. As Reich said, the neurotic makes you dig and dig while the [borderline] is very honest (or at least has a very hard time hiding things).
If the person doesn't seem like an altruist then asking about how parents or important people in their lives would think about the bad consequences of their action is the route to go.
The altruist has issues with feeling like she doesn't belong to the family and asking about this will allow you to work with these feelings which are tied to bad conscience, but the egoist's masochism has to do with knowing that the parents want(ed) him to be something.
I've also seen in the altruist passive-aggressive punishment of the parental imago: "you abandoned me and see how I am suffering or dying!" . I've also seen an egoist who is punishing himself for cowardice and weakness where the reference to he parental imagoes wasn't front and center.
These things can come up as early as the first session with some patients.
They will admit that it feels right to say they don't deserve good things, for example, but they won't tell you about what their "sins" are.
However, to keep them you have to express that you know you haven't earned their trust yet and that you will check with them about these things and they will tell you when they are ready.