That is exactly what Buffy did not need. Buffy plunged into the abyss and crawled her way back out in the absence of any genuine help or support.
But it was the realization, finally, that she had a job to do and that she actually did need to do it simply in order to get past the depression, to quit crying about the past and begin looking forward to what the future could bring that did get her out of that abyss, both figuratively and literally, in the season finale. And that had to come from within herself, not from anyone else trying to sympathize with her or protect her from the real world, which is exactly what Riley would have wanted to do. His very reason for leaving in the first place was that he was never able to feel that Buffy really needed him for anything beyond sex. He WANTED to be her hero, her champion, her protector. She couldn't allow him to do that in Season 5, and it would have wound up almost certainly getting her killed in Season 6. Buffy didn't need a protector by that time, and she hadn't needed one since sometime in Season 3 at te very latest. Remember what Whistler told Angel. "She's gonna need a lot o' help, that Slayer." And at that point, she did. But she grew up. She survived, she learned, and she became, if not totally self sufficient, at least mature enough to face her own demons, whether they were real or emotional. Someone, ANYONE, there at that point, saying, "I'm here, darling. I'll protect you," was absolutely the worst thing for her.
Plus, just on a practical level, Riley wasn't up to the job. No human was, or ever could have been, on a full time basis. Not even Angel or Spike, powerful as they were, would have been able to do it, and the longer Buffy depended on them to do it, the less her chances of survival would have become. In order to survive, the Slayer has to get back up, on her own power, one more time than she falls. And, ultimately, she has to do that getting up on her own. Come the day when she can't do that, she's dead, and the next girl on the list gets Called.