I'm pretty much an expert in this area, bud. My wife left my daughter and me when my daughter was only 2. Pretty much the same situation. Didn't see it coming and didn't know what to do.
Some relatively blunt advice:
1) Don't blame yourself. She left you AND your child - not just you. This is HER fault - not yours.
2) Seek the company of family. When this happened to me, I literally stopped eating for about two or three weeks. Not good. You're going to be down for a while, so get some family to help you out with the baby and with yourself. And don't do anything stupid. Remember that your baby still needs you.
3) If she's serious and you sense that she's serious (that this isn't some kind of temporary thing), file for divorce as soon as possible. DO NOT be the defendant in the proceedings. Be the plaintiff and seek SOLE (not joint) custody.
4) After you file for divorce, give her some time and see what happens. By time, I mean a couple weeks after she's served the divorce papers. If she doesn't come around and want to get back together, go forward with the divorce. Most states have requirements if you have kids. You'll probably have to do mediation and get some kind of state sponsored parental/divorce counseling.
But, if this is anything like what happened to me, she will eventually come back pleading for you to take her back. You SHOULD, but ONLY do it on the condition that you both get counseling. See a lawyer about your options for having her sign some type of "agreement" which stipulates that if she refuses counseling, you get a divorce and you keep the kid. I know that sounds harsh, but you have to BE harsh and to the point in these situations. NEVER let your wife think you're going to roll over, as that's what she's hoping for if her intent is to come back and "get the kid" in a custody battle.
(My wife actually had to audacity to say "I'm getting the kid, they always give the kid to the mother". She learned very quickly she was wrong.)
5) If she stays gone and you don't hear from her, find out from the state how long a parent needs to be absent before you can claim abandonment.
Again, don't beat yourself up. You didn't cause it. I'm operating under the assumption that you aren't abusive, or your wife would have taken your kid with her. This means to me that she left for purely selfish reasons.
Take care of yourself and that baby and just know that there are others out here who have been through the same thing and lived to tell about it. I've been a single parent for 13 years now. I truly hope you do not have to go through what I've gone through, but keep in mind that if you have to, you will have the strength to get through it.
I hope it all turns out well. PM me if you need to talk privately.