My mood depends on him

I try to distract myself but it's hard.

I feel so happy and energetic when we talk, I feel like I can do anything.

But if I don't see him in the day, if I feel he doesn't want to talk to me or see me, gosh my day is ruined.

How to avoid that? I really try to think about smth else but even things I love to do like reading for example,I struggle because I can't focus...