Relationships can be scary. Your guy may have been trying to test the relationship, not with the idea of leaving, but with the idea of testing if you are there. You talked to him and he is doing better. This says a lot. Just keep talking, trying to reach out to each other, and having fun...