Midlife divorces are mostly the result of midlife crises from both ends of couples that lead to relationship saturation, boredom, change in life perspectives, desire to achieve more, Infidelity, etc. All these phenomena may end up in serious communication gaps, frequent conflicts, bitterness, and eventually separations.
If your husband ignores you unless he wants something, that refers to some serious relationship gap between both of you. A person mustn't need to be an ideal husband, but ignorance is never okay. He is either suffering from a psychological issue or emotionally involved somewhere else.
Your husband always seems to be in a bad mood because he is going through hardships you don’t know about. Keeping his problems to himself has made him cranky. This situation of not being able to share his problems brings about mood swings. Unfortunately, you are at the receiving end.
Yes, guys do think about their ex or exes after marriage. They can even engage in discussions about their exes with their spouses. However, the way they think about their ex-partner matters. It’s fine if they are platonic. If they still have feelings, it is a matter of concern.
Your wife is keeping something from you. While it can be that she is planning a surprise or hiding a truth, the best way to know it is to make her talk. Making assumptions will cause misunderstanding and bring in new difficulties.