If your image is correct, it appears that you have a "planar 3 link arm" mounted on a turn-table. If so, I would suggest that you decompose the problem into yaw (joint 1), and X/Y in the plane (joints 2-4). It will probably be easiest to use polar coordinates.
You should be able to find many solutions online for a planar 3 link arm.
Using Euler angles and the velocities expressed as a difference between Euler angles over time will work, but it does not give you the minimum distance between the angles.
If you calculate the velocity once like this, the end effector will move towards your goal. If you actually want to stop at your goal you will need to periodically recalculate velocities ...