I play ostinatos all the time. Saying "all the time" I really mean it - that's my favorite technique. I think the essential part of it is a precise timing. You gotta join with your right hand in the right time, and then you start gaining momentum.
Besides, you need all your concentration; I came to conclusion that brain works like a CPU: if your computer is overloaded with tasks, you can't start a program (i.e. play with your right hand). Way aback me and my friend couldn't understand how one can play guitar and sing - that's because we were thinking about what note goes next, and couldn't look aside. I guess that our brains can't really do multitasking, and when we do two things simultaneously, we do one of them automatically.
Hence, if you want to solve your "ostinato" problem, you need to play a passage you know very well (and I mean,
very well) with your left hand - by doing so you will allocate some of your RAM to your right hand
Or you may try to slow down the tempo - it also lets you jettison your resource-consuming factors.
Now, let's return to the beginning, where I wrote about precise timing: of course, you want to play cohesively rather than discordantly. To achieve that you need to start with simpler things: try hitting one note per bar for the first time. After succeeding in that, move on to two, three, and eight notes, and to more complex passages eventually. And apply that to your left hand as well: play arpeggios rather than pentatonic scales or one and a half octave melodic figures