I didn't want to hijack truthbeknown's thread by going into my own issues too much, so I'll reply here as tortuga's post below is a good jumping off point, but the subject matter is similar:
D19 (just recently diagnosed BPD) slept with us until she was 3.
She felt very insecure, sleeping by herself, so by about 18 months, she began literally climbing out of her crib, and she would come and stand in our bedroom doorway asking us if she could sleep with us.
We would go spend time with her, and establish a bedtime ritual where we'd help her brush her teeth, then we would take turns, and spend about an hour or half hour with her. Reading books to her, and singing bedtime stories. It took about 6 months for her to accept this routine, and stay in her own bed, but we kept up the routine until she was about 6, when she didn't seem to need our help falling asleep.
My SIL is probably also uBPD, and her daughter has some form of something going on (BPD? ADHD? we don't know) - (but she has been in treatment since age 9). She slept with her dad until about age 10. SIL did not sleep in the same room with them. Seems pretty concerning on the surface - but my point is, that this separation anxiety seems to be a common theme where BPD is involved.
My Ex is the uBPD, but she's attached more to her new H now. I don't know what goes on over there.
It took many months for now S5 and D3 to let go of the separation anxiety... .from me (because their mother neglected them, though she's doing better now).
The ritual above sounds good. S3 was especially anxious about being separated from me, and at 1-2 years of age are the critical attachment time. I finally got both of them to go do bed in their room after months of co-sleeping with me. Now S5 even repeats the ritual: "take bath, get dressed, brush our teeth, read, say our prayers, go to sleep." He's funny, and says it in a sing-song way.
Still, D3 usually wanders into my room in the middle of the night. Last night, she was ok until 6am, just before I got up, and came in to lay next to me. S5 hardly ever comes in, though he asks sometimes. He's old enough that he does what I tell him. Late last night, he peed his bed, so I had him change and slept on the other side of my bed (it was either that or put him in the living room on the hideabed).
This morning when I dropped them off, D3 wouldn't let me unbuckle her from her seat. I had to pry her hands off, but then not wanting to hurt her, I just said, "give me a hug," and I got her unbuckled. "I'd take you to work, but they don't allow babies there, sorry." She clung to me as I carried her into her grandma's house. GM asked her, "are you tired?" I think D3 is at the age where she is starting to "play things up." She seemed a bit angry I was leaving. The last time I had them, Monday morning, she acted a little like this, but this morning was a bit more dramatic. I kept assuring her that I was going to pick them up later today. S5 is fine with the schedule, though he always asks how many days they're going to be with me. Though I think S5 is the one more like his mom (easily triggered by hard to control emotions), D3's behavior is a bit concerning. It feels like she's possessive of me, and I wonder how much of it is normal Daddy-daughter dynamic, how much of it is still a reaction to the separation of over a year now, and if I'm doing anything to contribute to it, like maybe I should hug, hold and kiss her on the top of the head less?
Back to the co-sleeping: Since people can be at risk for developing BPD due to inborn traits, I wonder how much of this anxiety is just who some kids are. Certainly with a parent who projects their anxieties, inborn traits can be exacerbated.