He said that he committed zina with a woman but he was lying
Question

                I am suffering deep torment because of a sin that I committed in the past, and I do not know how to rid myself of it. My life has been turned into hell because of this thing. 

Five years ago I was living in a religious vacuum, and I was far away from Allaah. I have a cousin who was the only friend I had in the whole world. 
One day the Shaytaan tricked me, and I told my cousin that I had an illicit relationship with some girls, but in fact I had no relationship at all with them. 

I do not know the punishment for this sin. 

Unfortunately I thought that manhood meant having relationships with women as many young men think nowadays. 

No one knows about this and news of it did not reach those women. 

In Ramadaan last year I repented to Allaah. I had a relationship with some women by phone and internet, so I told them that I had repented and severed my ties with them. 

I felt the sweetness of faith that I had never felt before. 

But I still remember the sin that I committed several years ago. It has to do with people’s honour. I prayed istikhaarah and thought about it a great deal, and I am still hesitant. Should I tell my friend that I lied to him so as to prove to him that these women are innocent of what I said about them, in which case I will lose my only friend when he sees that I lied to him? Or should I keep quiet and not say anything, but I fear Allaah’s punishment for this sin, so what should I do?.
Praise be to Allah.We ask Allaah to forgive your sin and to 
    conceal your fault, and to help you avoid temptations both obvious and 
    hidden. With regard to your question, it can be answered in the following 
    points: 
1 – It seems from your question that the one 
    whom you accused of committing forbidden actions is a specific woman whom 
    you and your cousin know. If it is a specific, known, woman, then this is 
    slander by you against her, which is a major sin and an abhorrent forbidden 
    action, because it is a slander against her honour and a transgression of 
    the limits set by Allaah. The Prophet  (peace and blessings of Allaah be 
    upon him) said, as was narrated by Abu Hurayrah (may Allaah be pleased with 
    him): “Avoid the seven sins that doom one to Hell.” They said: “O Messenger 
    of Allaah, what are they?” He said: “Associating others with Allaah (shirk), 
    witchcraft, killing a soul whom Allaah has forbidden us to kill, except when 
    it is lawful, consuming riba, consuming the orphan’s wealth, running away 
    from the battlefield, and slandering chaste believing women who never even 
    think of anything touching their chastity (cf. al-Noor 24:23).” Narrated by 
    al-Bukhaari, no. 2615; Muslim, 89. 
As well as slandering that woman, you are 
    also saying that you yourself committed zina, even if you are lying. 
But if it is not a specific women, for 
    example you said, “I did such and such with a woman,” and did not refer to a 
    specific woman, then this is not regarded as slandering anyone, but you are 
    still saying that you committed zina for which a hadd punishment is 
    deserved, so you have to clear your own name.  
It says in Badaa’i’ al-Sanaa’i’: If a 
    person says, “I committed zina with a woman, but I do not know who she 
    was,”, his confession is valid and he should be punished. Badaa’i’ 
    al-Sanaa’i’, 7/51 
2 – If it is a specific woman, but you have 
    repented and regret what you did, part of your repentance is to tell others 
    that you were lying, so you have to tell your cousin that you were not 
    telling the truth, because you have to clear the name of that chaste woman. 
    It is not permissible for you to give precedence to the friendship with your 
    cousin by slandering the honour of a Muslim woman. 
Ibn Qudaamah said in al-Mughni: 
The apparent meaning of Ahmad’s words 
    is that the repentance of the slanderer is to state that he was lying. So he 
    should say, “I was lying when I said that.” This is the view of al-Shaafa’i. 
    Ibn ‘Abd al-Barr said: Those who said that also include Sa’eed ibn 
    al-Musayyib, ‘Ata’, Tawoos, al-Shu’bi, Ishaaq, Abu ‘Ubayd and Abu Thawr.
‘Abd al-Razzaaq narrated in al-Musannaf 
    (5/77) that Tawoos said: His repentance (i.e., the one who accused someone 
    of zina) is to say that he was lying. 
3 – You should note that the Prophet 
     (peace and blessings of Allaah be upon him) said: “Whoever seeks the 
    pleasure of Allaah by angering people, Allaah will suffice him against 
    people, but whoever seeks to please people by angering Allaah, Allaah will 
    leave him to the people.” Narrated by al-Tirmidhi, no. 2414; classed as 
    saheeh by al-Albaani.
This hadeeth indicates that what you fear of 
    a bad relationship between you and your cousin is an insignificant matter. 
    Whoever obeys Allaah and seeks to please Him, Allaah will suffice him 
    against people. So you should care more about your relationship with your 
    Lord than your relationship with your cousin. Remember that this is one of 
    the trials with which Allaah tests you, so do what is right and put your 
    trust in Allaah, and do not fear the blame of anyone. Pray a great deal for 
    forgiveness, repent and make du’aa’ to Allaah, asking him to make you 
    steadfast in speaking the truth, and to reconcile you and your cousin, for 
    the hearts of men are between two of the fingers of the Most Merciful, and 
    He turns them however He wills. And Allaah knows best.