theres an app called freedom thats helped me out a lot with this   it basically lets you block whichever apps you designate on a timer that you set whenever i think okay i need to do something else ill just set it for an hour or 2 and force myself off my phone its led to much more interesting uses of my time  i highly recommend checking it out