As irritating as it may seem, thinking about your ex is perfectly normal. As your partner, he played a significant role in your life. When you broke up, it left a void. You are in the throes of grieving not only for him, but the life you had together, and the future you thought had. Acknowledge these thoughts and then let them go. The sooner you accept and come to terms with your breakup, the sooner you will be able to move on.
To help overcome this period of 'grief,' you must keep yourself as busy as possible. This is an essential element of no contact. If you find yourself thinking of him when you should be sleeping, download some free relaxation apps and focus on them instead. You need to identify solutions that work for you, but stick to a routine and fill up your diary with positive activities.