The Verdict: Need More Info
While you are still legally married the declaration remains open in principle, but a separation invites questions about the marriage. Take advice before declaring, and declare before any divorce is final.
The law requires the declaration to be made during the marriage. A separation, whether informal or by court order, does not end the marriage under Portuguese law; a divorce does, and after a divorce there is nothing to declare.
The other conditions are the same as for any spouse: three years of marriage, the marriage transcribed into the Portuguese civil register, and before six years the prosecutor may object for lack of ties to Portugal.
How the registry treats a declaration from a separated spouse is not something we can state with confidence, which is why this needs advice on your facts.