Whatever lies buried in your subconscious that made you a bad boyfriend/husband or whatever is still in there. If you couldn't reconcile being emotionally attached as well as physically attracted to the same person (it's called a "split": you feel safe when you're not turned on to someone, but the same person you feel safe with? You're not attracted to them), then it's intimacy issues and they won't go away by themselves. And that's just one of the many things that could have caused you to sabotage your past relationships. It will also cause you to sabotage your future relationships, because people? Well, we are who we are. And we don't change much in months or even years. Decades is closer to the reality, unless we are really "awake."
So, It might be a good time to invest in therapy. Especially if you hope to turn this from an infatuation into a genuinely intimate relationship. You sure don't want to do to this guy what you did to the women in your life. Of course, it could just be that you weren't truly into women, which is a horse of a different color. Maybe your subconscious was protecting you. The thing is, you'll never know without a GREAT DEAL of internal exploration. And maybe meditation could help with that, but so could therapy. This isn't something that we can give "ideas...how to." You need to KNOW who you are FIRST. That is what will help you, not advice from a board of people who don't know your history or your life. Ask your friends - the ones who really KNOW you - what they observed. And encourage them to be completely honest. Of course, that means you'll have to tell them you're into a guy now. (You don't know if you're into guys in general. For the moment, you only know that you're into HIM.) So, you will want to weigh how honest you intend to be with others, too. This is not something that can happen in isolation (just you and him), if you want go find out what made you act as you did in the past. Look at your parents' relationship first, because it always starts there, but however you proceed, keep in mind that It's ALL relational (meaning that A led to B, which then caused C), and that will include opening up to the people who know you better than we do. But if it's not safe to do that, skip that step, but enlist the services of someone who's trained to help you look at yourself.
Have fun for now, but make sure your friend knows this is all new to you, and it's a path you've never been down before, so he'll need to be with you, but give you breathing space. Otherwise, you'll panic (which, I'm guessing, is the reason for this post: you know who you've been and you don't want to be that person with him), and what sounds like a very good friendship will also suffer from the stuff you have yet to acknowledge TO yourself.
Best of Luck.