England spinner Monty Panesar will leave Sussex at the end of the season and will immediately go out on loan to Essex for the remainder of the summer.