Look, typing my thoughts out here so hopefully something will make sense.
Personally i am not in a normal relationship, it is one made out of having a child together and now we have two. i must admit we probably wouldn't be together if it wasn't for the kids and by all means i spend some days wondering why we are anyway! It is kid of a bizarre situation because we love each other and she will do things for me that only a (eventual) wife should but it isn't the same as a previous relationship where it ended badly for me anyway. I turned to drinking then as well and i found out it got me nowhere but whole other story there. But yeah, point of all of that is i'm not in some happy picturesque family environment so i am not wanting to feed you a bunch of nonsense. I spend my life making sacrifices for the good of my kids and being there as a dad so i hope i can offer you some advice.
first of all i don't know what the issues are in your home and certainly between yourself and your wife, but i will ask is it all one way? Sometimes taking a step back and looking at everything has to be an answer in anyones life and as much as it might look bleak, sometimes the problems are further than simply 'i've messed up' type of attitudes. So yeah, hopefully given a bit of time you both can see what is wrong and how to fix it, rather than lay the blame at simply your table. the other thing is always WHY isn't she happy? None of the idealistic crap, what are the bare bones of why isn't she happy? Because from my own perspective nothing better than having a home with kids so find out why she isnt and go from there.
If it isnt going to work out then unfortunatly that is something that we all experience in our lives and myself like many others know and respect how you are feeling right now. Time and space is what is needed, not trying to force an issue that will never lead to anywhere other than where you don't want to be. Make sure you keep in touch with your Wife and escpecially your daughter and just try and soul search between you both to come up with the problem first and foremost before you try and find a solution.
the world is a dark place my friend, its up to us to shine that bit of light for ourselves. sometimes the light will go out but we just have to try that little bit harder to light up the sky again.