Though there is no excuse for adultery and the offended spouse is not to blame emotional distraction or unmet needs are major contributors to the temptation of having an affair
Upon reflection, if you discover that you have contributed to the problem, repent and keep that in mind as you consider your response to the situation and dealing with adultery is very complex, and it involves a lot of issues that you must address before determining your actions.
If your marriage was unhealthy to begin with, and your spouse's act of adultery was a short-lived event that came in a time of weakness, then that is important to consider. If that is the case and your spouse is being honest and repentant, then it is suggested that you forgive your spouse and reconcile. A first prerequisite to doing this would be to agree together to get marriage counseling to help "repair" the weak areas that may have contributed to the problem and to rebuild the lost trust.
If, however, your spouse is defiant about his or her act of adultery and if it is still happening and he or she refuses to stop and if this is not the first time it has happened then your response needs to be much stronger. This is when you may consider separation or possibly divorce because staying in the relationship can expose you to serious disease, as well as great emotional harm.
If you decide to move toward divorce, it is also recommended that you get some counseling to help you through the process. With your emotions frazzled, it can be a very difficult time in which to make sound decisions alone so get some objective input from a trusted leader or counselor.
If your spouse is repentant, it will take you some time to regain your trust for your husband or wife and it is up to you to forgive your spouse and to do your part in working at the relationship. However, it is up to your spouse to work at re-establishing trust and that takes time.
Going through the aftermath of adultery is much like grieving the death of a loved one, whether or not you and your spouse reconcile, it is important for you to give yourself the right to grieve. You have been through a terrible betrayal. Do not let anyone convince you otherwise. It is normal for you to not be as lighthearted as you may have once been. You have been hurt and those feelings of betrayal and grief are normal and to be expected.
As mentioned in the beginning, marriage is much larger than the two people it surrounds; therefore, seeking spiritual guidance and instruction and/or professional help cannot be emphasized enough and additionally, there is an opportunity here to finally deal with issues that may continue to cause damage to your marriage if left unresolved. There will be hard work ahead but the reward could be a GEM of a relationship.