What do you do if you still have feelings for your past but you have a boyfriend?

The best thing to do is to simply try to get rid of all your past feelings and move on. You have a boyfriend now and you should focus all your attention and feelings on him. How would you feel if you found out he still had feeling for an ex? Not very good I would think. So forget about the past and focus on him. If you can't do that then you shouldn't have a boyfriend because you're only hurting him. Tell him you need time to move on from your past relationship(s) and when you're ready for a new relationship tell him.