EastEnders star Matthew James Morrison will be leaving the BBC soap after three years playing Felix Baker, with his final scenes set to air later this year.