If I do bad things (drinking alcohol ,fornication, etc), does that mean I am an infidel and all my good deeds are not accepted ?
A Muslim must be certain that certainty about someone’s religion and faith cannot be removed easily [by doubt]. It is impermissible for a Muslim to attribute infidelity to himself easily. You must repent to Allah the Almighty and ask Him to accept your repentance, for verily Allah forgives whoever sincerely repents and do good deeds. You must make remembrance of Allah (dhikr) and invoke peace and blessings on the Prophet (peace be upon him) in abundance.
May Allah accept your deeds and amend your affairs.