No one is at their best in these types of situations, but your support is so important. Give yourself credit for being a good friend and turn to your own sources of strength and support during this difficult time. If you don't think you want to be around the person who had the affair for a while, it is okay to say so. If you are in a situation where you have to be around them, make interactions brief and business like. Don't be rude but you don't have to fake being overly nice either. Just remember that you are just as responsible for your choices in how to behave as they are. Losing your temper and confronting someone inappropriately at a less than suitable time or place can cause more stress and hurt for everyone involved.
If you think you've goofed by saying or doing something that may have caused your loved one more hurt, let them know you are sorry and that you truly just want to support them. Let them know that you don't always know what is best to do or say but that you remain committed to being there for them as they go through this difficult time. Be nice to yourself. These situations are difficult and you are doing the best you can. Your loved one is lucky to have you and you can feel good knowing you are standing beside them during one of the most difficult times in their life.