It can be a happy ending or sad ending but if it’s possible I would like if he tries to push his love interest away so she won’t get hurt

I have already seen:

Boku no Hatsukoi wo Kimi ni Sasagu

Boku no ita Jikann

I've seen & loved the following dramas and HIGHLY RECOMMEND THEM:

1 litre of tears(Jdrama)

Autumn's Concerto(Taiwanese drama)

I think Koizora has exactly what you're looking for (ML w/ terminal illness pushes FL away).
There's a drama version and a movie version