I don’t think this is mental illness. I think it is a lack of important personal skills. It sounds to me like you use talking with others to figure out what you think about things. You haven’t learned a way to think something through in your own head. Or maybe you don’t trust your own thinking so you turn to others to verify or validate your experiences.
I don’t have enough information to hazard a guess why this is so. It might be helpful for you to see a counselor for a few sessions to gain some insight as well as some new skills.
As for hiding things from your boyfriend: That speaks to insecurity and/or a lack of trust in the relationship. As you have already figured out, hiding things is a form of lying. Avoiding issues doesn’t bring you closer. It pushes your boyfriend away.
I think it would be helpful for you to work on more honesty in your relationship directly. Apologize to your boyfriend for not trusting him and ask for his help when you are insecure or afraid to bring something up. Working together is the route to closeness. IF that is too terrifying, then perhaps a counselor could be helpful with this issue as well.
I wish you well.