The Rebbe of Kotzk, some 150 years ago, said that each person should have at least one friend that he can tell all his secrets to, even the most shameful ones.
The secrets that one does not want to reveal are of two types:
The first may be something that I am ashamed of, or simply something that I do not want publicized because, if revealed, it may cause me to be ridiculed or abused, it may be harmful to me financially or socially, or it may even be dangerous for me.
The other kind of secret is a reserve, a shyness about revealing certain inner aspects of myself which I keep to myself, in myself.
As a friendship intensifies, I gradually become ready to reveal more parts of myself.
People may be ashamed of their deeds or their thoughts; however, in most cases they are not embarrassed by them.
It is not the misdeeds themselves but the fact that someone else knows about them that makes people blush.
On the other hand, there are intimate emotions and ideas that are so private and so delicate, that exposing them is giving away the essence of their existence.
In intense friendship, in which the other person feels as close as a second soul, everything can be revealed without embarrassment.
–Rabbi Adin Steinsaltz
From Simple Words by Rabbi Adin Steinsaltz