I think its normal to eat when your bored, and i've found i usually tend to eat absent mindedly until whatever it is is gone. Not a healthy habit but an understandible one. If you want to avoid eating all that bad stuff heres a couple things i've found to help me:
1: rice cakes and other healthy stuff that doesnt taste good - Yeah they taste like edible coasters, but you can safely eat an entire tube of them, and besides after a certain point you really dont taste the ice cream/etc. as much anymore anyway.
2: Buy smaller containers of food - Its just nature to sit and eat something until its gone, just make it gone faster. the tiny ben and jerry's containers are great for this. Or the little individual ice cream tubs, but those are so small it barely dents a serious craving for ice cream.