Is it permissible in islam to share your sin to benefit someone? Or in—any other situations. But in this case—if it benefits; someone in a way that, that person even stops sinning when hearing the story of the sin of one. (i.e. If there is one talking with his friends and—he says the he had done this sins and warns him to not do this sin and that warning and sharing the sin; stops one from sinning.)
What I heard regarding Islamic stance of this is that one must never—share his sin in any situations.

If for example there is a man who is straying on a wrong path and it is evident, and the only way you can help such a person was by personal exemplar. Helping would be to express personal experience.

 “Allah does not love open utterance of evil in speech except by one to whom injustice has been done, and Allah is All-Hearing, All-Knowing." [4:148]

It is not permissible to talk about a sin that a person was committing, because this is an indignity to himself, but he can say that he knows a person who was doing this sin, and such and such happened with him, so he has delivered the required, without offending himself.
As for the verse that you quoted, it has nothing to do with the topic, because it talks about the oppressed speaking about the injustice that occurred to him