You can be, it's really up to the judge. This will likely heavily depend on what your relationship is like currently, if he discusses the cases, he works on with you, and how that has affects you.
As an example: if you made the case that the two of you have a long history together, you are still friends who talk almost daily, he often tells you all the details of the cases he works, you often experience a high level of anxiety about his safety on the job, and this has caused you a high level of sympathy for those in law enforcement, then you very well may be excused. This is especially true if you feel like you can't be impartial with your judgment of the accused due to your history with your former boyfriend.
You will still need to go to court on the first day and explain this to the judge in open court. Make sure you aren't shy about explaining your situation in detail. The better you do explaining your situation, the better the judge and lawyers can decide if you should be excused or not.