I think you did a good thing when you stopped at the store and talked to your son about you losing control. Yes you yelled and cursed, but you didn't resort to physical violence. And it is good for children to see their parents as real people, with good and bad points.
Riding a bike with your kids is about as good as it gets.