No one who starts down a wrong path in life expects it to end up badly, but it almost always does - as you've discovered. This is especially true with adultery; as the Bible says, "Can a man scoop fire into his lap without his clothes being burned? ... So is he who sleeps with another man's wife" (Proverbs 6:27, 29).
Can God forgive you? Yes - and He not only can forgive you, but He wants to forgive you! He loves you, in spite of what you've done, and He doesn't want you to carry this burden of guilt any longer. Your sin was great - but God's love and grace are even greater! His love is so great that He was willing for His Son to die for you. Jesus Christ was without sin, but on the cross every sin you ever committed was placed on Him, and He took the punishment you deserve.
What must you do? First, confess your sins to God, and tell Him you're sorry that you've turned your back on Him. Second, ask Christ to come into your life and cleanse you from all your sins - and He will. The Bible says that "the blood of Jesus, his Son, purifies us from all sin" (1 John 1:7).
Then ask God to help you share your faith with others - even those you hurt. You can't change the past, but by God's grace you can walk a new path - and help others walk it also.