Make sure you actually like the generation you are playing before you try to force yourself through it. Personally I find planning out a team beforehand makes it a lot easier to keep going instead of just randomly picking Pokemon on the fly. Maybe try playing the games while also watching long videos or something that wouldn't require much attention.
Alternative ideas include doing challenge runs or making up your own rules to keep you engaged. I know this is not for everyone, but I find that some of the supplementary material like the anime or various manga can help reinvigorate my desire to play. Also making your run goal-oriented in some way can help, such as having the intent to complete the Battle Frontier or taking your team to Stadium.
If this series once encapsulated you before, then it's still possible for it to happen again. This was the case for me as I recently had a huge resurgence of Pokemon in my life. Look past your frustrations with the series and rediscover the magic that made you fall in love with it in the first place.