Hello Mary123: Well... the obvious answer here, I guess, is... seek out a therapist, or perhaps even a trusted friend, with whom you can talk through your feelings. Beyond this, it may simply be a matter of allowing the passage of time. However, in addition, I would think it would be important to get out & do things with other people... socialize, volunteer, pursue a hobby, whatever would be of interest to you. The main thing, from my perspective is to do
something to minimize the tendency to ruminate about this... to allow it to keep rolling around in your thoughts.
I take it, from your post, your declaration of affection was not met with a positive response. It's going to take time to get over this. There's simply no way around it. So in the meantime what's going to be important is to move forward in some other direction &, at the same time, to have someone to share your feelings with whether that be a professional counselor, therapist or trusted friend. I wish you well...