Random thoughts from a mediocre bassist:
1. I rarely practice the same thing for more than about 10 minutes. I take one little passage, give it my best shot, then move on. There's always tomorrow. Don't give up on a hard song if you really want to play it, but: this music thing is definitely a marathon, not a sprint. Just because you can't get a song down in a month doesn't mean you won't get it in a year. Just be patient and keep chipping away at it, a little bit each day. Meanwhile, keep working on other stuff too.
2. I used to spend a lot of time repeating passages while inching up the metronome notch by notch, and I came to hate it. There's this seductive idea that if you can do it well at one speed, surely it can't be *too* much harder to do it just one notch faster. So you think you'll get there eventually without really doing anything special, just a lot of repetition and gradual speeding up.
But it's never that simple. What actually happens is the initial slow practice works great, you learn the part and make noticeable progress, you start to feel comfortable, so you move up a few notches with no trouble, and again, and again, and then... you hit a wall. And you can spend days and weeks just pounding away at that wall, that top metronome marking where you can sometimes make it through. Eventually maybe you'll make progress that way, but it's slow and frustrating, and you make yourself really tense by practicing at a speed where you're always just on the verge of screwing up.
So instead the way I think of it these days is, I really only play at two tempos: too slow and too fast. When I play fast, it's not for *practice* exactly, it's more of an experiment. I'm trying to figure out which parts I can do, which parts I can't, and troubleshoot the parts I can't. Does it look like the problem might be the fingering? The right hand, the left? What if I forget the fretting hand entirely, just lay it across the strings to mute, and do the right-hand alone, does it work then or do I still screw up? What if I try just that *one* string crossing? Etc., etc.
From those experiments I get some ideas about what to try: maybe it's a new fingering, maybe something else. Then I switch to the actual practicing part, which I do at the "too slow" tempo--so slow that I'm almost bored. This is where I memorize the new sequence of motions I want to try out. After maybe a few days of that, I start to feel comfortable with the new motions, so I try a few more of those "too fast" experiments and see where I stand. Rinse, repeat.
Anyway, just some ideas. Good luck, be patient with yourself, have fun!