Dear Friend,
Whenever you want a solution come out with truth, so that learned & experienced members of the community will show you the right path.
In your posting two things mentioned one is "Resigned in the month of May" and second one is "Terminated in the month of August". Which gives me an impression that your new employer terminated you from the job you took in the month of May’2017 after resigned from the 1st job. Your reasonable Job continuity is up to May'2017.
You are not one, there are many people having job discontinuity in spite of that they have got job. The job selection is a skill potent if one is matching the skill requirement of the employer, still the employer have to know the reason of gap. There are several reasons (family, health, higher study etc,) for which people left the job. One should skilfully offer an explanation which should be beyond the doubts.
Do not allow one to act on you, be genuine.