What does it mean when a guy ends things.. but then says he’s sorry and asks you to give him a little time to get himself together?

I know he’s told me he’s going through a lot when we first met, and I told him that if he needed me I’d be there for him… But recently he ended things and said we can just be friends.. and then hours later messaged me again saying to give him time to get himself together….
What does it mean when a guy ends things.. but then says he’s sorry and asks you to give him a little time to get himself together?
Post Opinion