He fell in love with a girl then he repented. Can he be friends with her?
Question

A young Muslim man went to study aboard, far from his family. He got to know a Muslim girl and the relationship between them grew until it became love, and they touched one another and kissed, but they did not commit fornication (zina). He feels fear of Allah and he asked her to change the relationship with him or to give it up because what they did is a sin. She understood that and said, “Let’s remain friends and we will never speak of love again, we can just be friends.” He feels that he has made a sacrifice for the sake of Allah, because he loves her very much, but he feels that this is not enough to please Allah. Is it permissible for him to speak to her as just a friend? How can he explain to her that he does not want to be selfish, because he loves her very much but his love for Allah is greater?.
Praise be to Allah.Firstly: 
Following the paths of fitnah is one of the reasons why Muslims fall into the traps of the Shaytaan. The rulings of Islam bar the way to many of these paths and warn against following them. Islam also warns against following in the footsteps of the Shaytaan. 
One of these reasons or causes is Muslims travelling to kaafir countries and settling there either alone or with their families; studying in mixed universities and keeping company with immoral people who do not point him in the direction of good or warn him against evil; giving his faculties free rein to commit sin, such as letting his ears listen to singing or his eyes look at haraam things, and so on. 
A man cannot protect himself unless he keeps away from these paths that lead to evil, and looks for the ways of peace and guidance with which his Lord is pleased.  
Secondly: 
We think that our brother is on the right track and is guided in sha Allah, because he fears his Lord and has given up his relationship with this girl, after committing sin with her because of his following the paths of evil mentioned above. 
The attitude of fearing Allah is very important, and giving up one’s desires for the sake of Allah is something which no one can achieve except those who understand Tawheed truly, in whose hearts faith is alive and manifests itself in their physical actions. 
But he has to remain steadfast in his actions, and not let the Shaytaan lead him down another path that will lead to the same result of committing haraam actions. There can be no friendship between him and this girl who is a stranger (non-mahram) to him. What this friendship leads to is well known, so he must not respond to her request. He should adhere to his stance and seek the help of Allah, asking Him to guide him to the straight path and make him steadfast in following true guidance. 
Thirdly: 
If he really loves her, then the sound way that is prescribed in sharee’ah is for him to marry her; there is no other option. But if he thinks of marriage he should choose one who has a good character and is religiously committed, as the Prophet (peace and blessings of Allah be upon him) advised. If he does not marry her, then being friends with her will lead to him doing haraam things, as he himself says happened. Indeed, if the heart remains attached in this way, even if no physical immoral actions take place, it will still affect his heart and his relationship with Allah and his submission to Him, in a way that is worse than committing physical immoral actions. 
Shaykh Muhammad al-Saalih al-‘Uthaymeen said:
 If it so happens that there is love between a man and a woman, the most effective means of warding off fitnah (temptation) and immorality is for them to get married, because his heart will still remain attached to her if he does not marry her, and that may lead to fitnah. 
A man may hear that a woman has a good character, and that she is knowledgeable, so he may want to marry her; or she may hear that this man is of good character, knowledgeable and religiously committed, so she wants to marry him, but the communication between the two is not done in the proper Islamic manner – this is very serious. In this case it is not permissible for the man to contact the woman or vice versa, and say that he wants to marry her. Rather he should tell her guardian that he wants to marry her, or she should tell her guardian that she wants to marry him, as ‘Umar (may Allah be pleased with him) did when he offered his daughter Hafsah in marriage to Abu Bakr and ‘Uthmaan (may Allah be pleased with them both). 
But if the woman gets in touch with the man directly, this is what leads to fitnah. 
As’ilat al-Baab al-Maftooh, question no. 868. 
And Allah knows best.