I would like know what is the penance for adultery. If forgiveness is possible, does the "forgive and you shall be forgiven" apply?
The idea that there are acts of penance done for sins is not taught in the Bible. It is merely a Roman Catholic tradition. See: Do we have to do penance?
Forgiveness for a Christian comes when you turn away from your sins (II Corinthians 7:10-11), confess you sins to God (I John 1:9), and stay obedient to God. If you are not a Christian in the way that God tells us to become children of Him, then forgiveness is given when you are baptized (Acts 2:38). See: How to Become a Christian.
Your ability to forgive others of their sins against you does reflect whether you will be forgiven by God. "For if you forgive others for their transgressions, your heavenly Father will also forgive you. But if you do not forgive others, then your Father will not forgive your transgressions" (Matthew 6:14-15). God expects us to be consistent. We cannot ask for something that we are not willing to give.