If you stumble onto such an issue again, you better separate the episodes before feeding the ripped file to Handbrake.
Depending on which software you are using, your ripped file might still contain chapter markers, which you can use to split the file.
You just need to determine which chapter numbers are at the episode boundaries and which numbers are just there to designate e.g. intro, main part, ad break, outro, and next episode preview.
You might want to give this a read: [HowTo]: splitting multi-episode files with MKVtoolnix GUI