Change and growth is a part of any relationship, and there will always be seasons that are more difficult than others. Remember to focus on the bigger picture. Just because his attitude seems to have changed a little, it doesn't signify a definitive end, and it doesn’t mean it can’t change back.
Now that you've identified there is a problem, it’s best to not let your mind go crazy inventing possible melodramatic outcomes.
Try not to act and speak out of your emotions (Within reason. We are human after all).
Try to really think about things practically. When you decide to chat with him about it, make sure you choose a time when your emotions aren’t heightened, like when you have your period, after you've indulged in a glass of wine (or a few).
Tell him you’ve noticed a change, ask him how he feels and if there is something you can do on your part. Try to remain objective and calm during his answers (because you might not like them!).
Relationships are a two-way street. Sometimes we start to build habits into our lives that can affect our marriage or partnership negatively without us even being aware of it.
Have you done something that contributed to his withdrawal? This could be anything from losing your sense of purpose to forgetting to show your love, etc.
Once you've spoken to him and worked out what the issues are, it’s time to shift the focus. Depending on what the contributing problems are, you then need to work on the solutions for those areas together.