About the workplace aspect of this:
- The law (Bundeselterngeld- und Elternzeitgesetz) entitles parents to take up to 36 months of parental leave (Elternzeit) per child (this is for both together, and only 24 months may be taken after the child turns three) - so no problem there.
- To actually take this leave, you must notify your employer seven weeks in advance. You can choose the duration of the leave (within the limits above), but you must commit to this duration - so there is no right to return early or extend the leave.
- Instead of taking complete leave, you may work part-time (up to 30h/week). Companies with less than 15 employees may refuse to offer part-time work.
The rules above are the legal minimum - employers may offer more (for example flexible duration of the leave). That is up to you to negotiate.
In practice, what you should do is:
- Figure out whether you prefer staying at home or working part-time - depending on how you can best balance your family's and your workplace's needs.
- Then sit down with your boss as soon as possible and explain your situation. They may or may not accomodate you, maybe even allow you to start your leave before the 7-week notification period, or allow you to only commit to a few months of leave with an option to extend it.
- If you cannot come to an agreement (or if that is your agreement), you can always fall back to your legal rights and just formally request Elternzeit, as explained above.
About the family aspect:
This part is off-topic for this site, but as I had a similar situation, I feel including it may help.
You write that
By law, she can divorce me any time
This is true, but mostly irrelevant, because in Germany divorce has almost no bearing on child custody.
and take away my son.
I understand that you are worried - but this is wrong. If you were married when your son was born, you (almost always) have joint legal custody (Gemeinsames Sorgerecht) for your son. That means neither of you may unilaterally make decisions about the child, such as moving out with them.
If she does move out with him without your permission, that is generally illegal, and if you go to court she will likely be ordered to send him back, unless she can show a good reason for taking him away (such as abuse). However, if it comes to this, you absolutely, positively need a) a good family lawyer, and b) to act as quickly as possible, because in child custody matters, every day counts. I hope it does not come to this - but rest assured, even if it does, you can do something.
she is having a difficult time and I can't talk to her about this.
This is the crux, I fear. You will have to find a way to talk about this, and/or find help from trusted family, friends, a counselor, whatever.
In the meantime, you will need to take care of these matters, and most importantly, take care of your son. Hopefully your parental leave will allow you to do this. Best of luck!