This has more to do with being “compliant” rather than with being “nice”.
In my opinion you should have properly stated your intentions right from the start: when he started going personal, a statements such as “let’s talk about work instead” or “but we aren’t here for such a trivial talk, are we?” would have properly done the job.
On the other hand your going along with him could have been interpreted as an approval signal, even if that wasn’t your intention.
PS: I’m a male and I can sympathize with him. Considered this I’m not trying to justify his behavior, as it was clearly unfair, I just wanted to share my personal opinion on this matter.