Will Allah Accept Good Deeds If One Commits Zina?
Question

Will Allah accept the prayer and good deeds of a person who is continually committing sin such as fortification even though in his/her heart the person is aware that he/she is sinning and is full of guilt and tries his/her very best not to continue committing such sin. Except for this weakness this person tries to be a good muslim e.g. never misses daily prayers, giving out time and money towards the cause of Allah, never taking alcohol or other un-halal foods etc.
Praise be to Allah.Praise be to Allah.
Will Allah accept your good deeds if you commit Zina?
Allah will accept whatever righteous deeds from one who commits Zina , such as praying, fasting, giving charity etc., and He will also accept his repentance , as He says (interpretation of the meaning): “And He it is Who accepts repentance from His slaves, and forgives sins, and He knows what you do.” [Ash-Shu`ra’ 42:25]
But there is the condition that his repentance must be sincere . Does this person truly regret what he has done? Is he indeed determined not to repeat the sin? Has he, I wonder, gotten rid of everything that may lead him to sin, such as relationships, addresses, telephone numbers, going to evil places, bad friends, movies, pictures and so on? What we believe is that if this person truly repents, he will give up this sin.
Zina is one of the worst kinds of immoral deeds. Allah says (interpretation of the meaning): “And come not near to the unlawful sexual intercourse. Verily, it is a Fahishah [i.e., anything that transgresses its limits, a great sin], and an evil way (that leads one to Hell unless Allah forgives him).” [Al-Isra’ 17:32]
Punishment for Zina 
Married people who commit Zina (adultery) are to be punished with the worst and most severe form of punishment , which is to be stoned to death, so that every part of their bodies may feel pain just as they felt pleasure in a prohibited manner even though they were not without a halal source of pleasure (i.e., within marriage). 
Unmarried people who commit Zina, and had never been married before, are to be given the maximum number of lashes prescribed in Shari`ah, which is one hundred lashes. In addition, they are subjected to the humiliation of having their punishment witnessed by a group of believers, and are to be banished for one full year from their city, the place where they committed the crime.
Punishment for Zina in Al-Barzakh
The punishment for those who are guilty of Zina in Al-Barzakh (i.e., after death and before the Day of Resurrection) is that they will be in an oven, the top of which is narrow and the bottom of which is wide. A fire will be lit under it, and they will be naked in (that oven). When the fire is lit, they will scream and rise up until they almost come out of the oven, then when the fire subsides, they will go back down into it. This is what will keep happening to them until the Hour begins. So how will their punishment be in the Fire of Hell itself?
We ask Allah not to despise us and to accept our repentance; we ask Him to help us to do good and to avoid evil, for He is the All-Hearing, Ever-Near.