If it was a 3 month stint at a new company that didn't work out you might have been able to leave it off of your resume. But the position is at the company you were at for the past 17 years. That means it's likely to come up during a reference check. Furthermore, you're almost certainly going to be asked why you left your last job in interviews anyway, so you'll have to mention it at some point.
So you should list all the positions you had with your former employer on your resume. (But not that you were fired. The other answers are correct that you don't put why or how you left a job on your resume.)
Alison Greene (Ask A Manager) advises people concerned about possibly getting a bad reference to either work with the former manager about what they'll tell reference checkers or give potential employers a head's up:
If you’re worried about getting a bad reference, trying calling your old boss to see if she’s willing to reach an agreement with you about what she’ll say to reference checkers. Many managers will be willing to work something out with you if you explain that you’re worried that their reference is making it impossible for you to find work – even if it’s only to agree to limit the reference to confirming your work there.
Last, if none of that works, you might need to warn future reference checkers that the reference from that manager might not be a positive one. That will allow you to provide some context about why – such as that your work there suffered while you were having health problems that have since been resolved, or that you were in a job that was a bad fit for your skills.
In your position, I'd also suggest using the manager you had before you changed departments as your reference for this job. Someone who's seen you work for over 3 months is a more useful reference anyway.
As for what reference checkers actually ask old employers:
This varies from employer to employer, but it’s pretty typical for a reference checker to ask about the quality of your work, your strengths and weaknesses, the reason you left the job, and whether the employer would hire you back if they could.