I've been the subject of a Child Protection Plan, OP. My adopted DDs were aged 7 and 4 and I was dealing with memories coming back of my childhood SA, which had led to me drinking too much and my MH in a bad place, as well as having to cope with DD1's violent meltdowns because of her adoption related attachment issues. There was also a police investigation going on about the abuse suffered by my DSis and me. (Thankfully, my DH was supportive.
I knew I was out of my depth so I reported myself to SS. The SW didn't trust me at first, as there were a couple of misunderstandings where she thought I'd misled her, but I worked hard to cooperate and in the end she really helped to get the school on board to help DD1 (now 10).
It's down to you to prove to the SW that you're able to keep your DD safe. You were obviously very near the edge, and if you told her that you'd obtained the means to actually commit suicide, of course she'll be thinking that your DD is at risk, especially if she can't get hold of you.
Remember, your SW doesn't know you, so it's down to you to show her that you're a good mum and that you're doing what you can to get yourself together.
And even if your psychosis is such that you really might actually hurt or kill yourself (and not just thinking about it, which I've done before), then you need to be in hospital, getting the help you need. It wouldn't have to be forever; I gave friends who have been into hospital for a time and then come out and rebuilt their lives.
And surely it would make sense if, in the event that you do need to go into hospital (if you might genuinely take steps to end your life) then surely it's a good thing that the SW has been in touch with your DM? It would be better for your DD to be placed with the grandma she knows than to go into foster care.
Maybe it won't come to that. But there's only one person that can convince SS that you can be a good mum to your DD and that's you. So I don't think advice to make a complaint is helpful. If your SW hasn't handled this right, you need to be in a better place so you can see things clearly. And maybe a complaint will be an appropriate course of action, once you've come out the other side.
I hope your DM can support you in the meantime. Are there any friends you can talk to as well? SS will want to know that you have a good support network.
You can get through this and come out the other side. 