As you are in a relationship for 5 years, sometimes a person is taken for granted or you figure out that your interests don't match anymore. I assume you both are around the same age , and this is the time you explore all possible options in terms of career, friends , interests and since these keeps changing at this age hence you might be experiencing difference of opinion with your boyfriend.
Consider the same situation with the new person, as of now your likings may be same and that is the reason you are having him on your mind.
Next Steps
You will have to do a clear introspection - are you seeing your relationship with your boyfriend as long term, and if yes, it is best to clear out the doubts as relationships do not work on doubts and suspicion. For the new person in your life, if the person calls, you can meet and clear out your apprehensions and feelings. Don't rush into a new relationship, you can try to understand the person first.
Health Tips
it is advised to take walks, go to gym or any other physical activity which would keep you busy and help in releasing the mounted up tension.