To deal with your friend after this situation, honesty is key. Be prepared for her to be very upset. You could offer to have a mediator present, like a mutual friend who is calm and rational. Try to focus on rebuilding trust and showing that you're taking responsibility for your actions and the situation.
Handling the relationship with your friend will be very difficult. You might start by writing her a letter explaining everything, your feelings, and your intentions. Then give her some time to process. It's important to be patient and understanding as she will likely be in shock and angry.
After being knocked up by her son, the relationship with your friend is likely to be severely strained. You need to approach her with utmost respect and remorse. Listen to her feelings without interrupting. Maybe suggest family counseling if she's open to it. It will take a long time to repair the relationship, if it can be repaired at all. You also need to be consistent in your actions and words to show that you're sincere in wanting to make things right.