Yeah I agree with the previous posters. You have to keep playing the guitar parts until your hands just learn to play the chords by itself, without you having to think about them. Then start humming the melody, and then singing.
Apparently it helps to practice the guitar part until it becomes an automatism and you don't have to think about it anymore Then you can concentrate on the singing part while you just leave the rest to your fingers
I never really tried it myself, but I do notice I have less problems singing songs I've already been playing for while.
Everyone is going to say practice, which is true and go slow first. It's the same as playing the drums. Your voice and strumming should play in unison, so make it play in unison. Don't let it own you, you have to own it!
I would try starting off very slowly, just simple lyrics, small phrases.
Also, I would try playing the song on guitar over and over again until you can play it without thinking about it at all. Once you memories the guitar part so well that you can play it entirely by muscle memory it'll be easier to focus on singing.
Also, try playing and singing along with a recording of the song, it'll help keep you on track.
You need to be very familiar with what you're singing and what you're playing. If you're a lot better at singing with piano, then get a song you can sing and play on piano, but play the chords on guitar instead. Make sure you get those chords down pat like you can on piano. And take it slow. If you need to, just learn the first two bars of a song. Then bars two and three... three and four... and slowly add it on.