As-Salamu ‘Alaikum dear sister,
The fact that you feel guilty about what you have done shows that you feel very repentant. Continue to repent for your acts and be confident that Allah (swt) will forgive you. Allah (swt) is the Most Forgiving and Most Merciful, so have faith that He (swt) will forgive you for your sins because He (swt) is the only one who can, if you seek repentance and never do the same thing again.
Allah (swt) says in the Qur’an:
Say, “O My servants who have transgressed against themselves [by sinning], do not despair of the mercy of Allah . Indeed, Allah forgives all sins. Indeed, it is He who is the Forgiving, the Merciful.” (39:53)
You have sought repentance and now the next step is to ensure that you never fall into this sin again. It will take you time to forgive yourself for it, but if you truly believe that Allah (swt) can forgive you, then you will be able to forgive yourself. In addition, don’t forget to ask Allah (swt) to protect you from Shaytan that you won’t feel tempted to even think about getting into a situation that could potentially lead you to a path of sin.
It is now important that you do all you can to ensure that this does not happen again in the future. This is quite easy if you follow the advice of Allah (swt) and refrain from free mixing or ever being alone with another man. You have learned the hard way that Shaytan is, indeed, the third person when a man and a woman are alone together, and this can easily lead things to take a direction in the haram. Take this to be a lesson in why Allah (swt) teaches us to behave in this way in order to protect us from Shaytan’s whispers and keep out of sinful acts. Simply being alone with someone just chatting “as friends”can soon lead to the development of feelings which then goes on to develop into something more serious. You become overwhelmed with feelings that stop you from thinking rationally about the consequences of what you are doing.
At this point, you are obviously worried now that the man you had relations with might expose you. Remember as well though that if he exposes you, he is also exposing his own sins, and exposing your own sins or anyone else’s is not OK from an Islamic perspective either, so the judgement will be on him if he should do that.
From this point, if you continue conducting yourself in the best way according to Islam by avoiding free mixing and being alone with another man, then people will see you for the good character you are conducting in the present rather than judging you for your past actions. Try not to get caught up in worrying about what could happen, when the fact is it may never happen and yet you will live in constant fear that it might happen. The important thing is that you have sought Allah’s (swt) forgiveness. His judgement of you is more important than what others may think of you.
May Allah (swt) protect you from Shaytan’s whispers, forgive your sins, and make it easy for you to abstain from sins in the future.
Disclaimer: The conceptualization and recommendations stated in this response are very general and purely based on the limited information that was provided in the question. In no event shall AboutIslam, it’s volunteers, writers, scholars, counselors, or employees be held liable for any direct, indirect, exemplary, punitive, consequential or other damages whatsoever that may arise through your decision or action in the use of the services which our website provides.