When a breakup occurs, you might lose all sense of reasoning and go running after your ex boyfriend crying and begging. You will feel that you need to stay close to him so he won't forget you and find someone else. That will make you stay on his mind alright, but in a negative way. You need to learn how to stay on his mind in a positive way. One that will make your ex boyfriend miss you and want you back.
When your ex boyfriend breaks up with you, he is already upset about something. If you insist on trying to get him to talk about it, he will be more upset and pull farther away from you. He needs to have time to think and get over what has made him unhappy. Your ex boyfriend cannot get over his problem if you keep constantly reminding him of it.
This might surprise you, but the best way to stay on his mind after a breakup, is to let him go. Use the no contact rule and stay away from him completely. Male psychology will teach you that men fall in love from a distance. The longer he is without you, the better you will seem to him. He won't forget you and go looking for someone else. He will do just the opposite.
By giving him the time and space to experience his life without you, he will begin to miss you. That is the key to getting your ex boyfriend back - making him miss you. When you feel you have lost something and you miss it, you want it back. If you got rid of what you are missing, you will realize it was a mistake. That is what will be happening to your ex. He will see that he made a mistake by letting you go.
Now, you will be on your ex boyfriend's mind constantly. He will wonder where you are and what you are doing.