At FL400, the autopilot started porpoising and was turned off. Afterward, the aircraft would not trim properly. The crew diverted; it was difficult to keep it pitched down while descending. During the final phase of flight, the yoke was very difficult to input pitch changes, but was okay in the roll axis. After landing, troubleshooting duplicated the problem. Elevator servo (p/n 4006719914) was replaced with serviceable unit.