The energy efficiency of non-road mobile machinery can be improved by using e.g. an electric drive system as a servo controller of a hydraulic machine to get an efficient electrohydraulic (EH) converter. However, the cooling of EH devices require more understanding and new innovations. This work presents a design of a 7-kW integrated EH machine and studies its electric motor heat transfer phenomena both experimentally and numerically. Further, to better match the torque and speed performances of the permanent magnet synchronous motor (PMSM) and the hydraulic machine a planetary step-down gear is utilized to triple the output torque of the PMSM. The integrated motor and gear system is then connected to a bent axis piston hydraulic machine, which is capable of operating both as a motor and a pump. Two different electric motor cooling approaches are investigated. The first cooling approach is to use some hydraulic oil inside the motor-gear chamber to let it flow freely as a result of the rotor rotation and move the losses to the surface of the converter cover, which is equipped with some air cooling fins. In the second approach, the oil flows through the converter and removes the losses more effectively. Motor losses and thermal behaviour are studied within these two cooling approaches. Computational fluid dynamic (CFD) simulations are performed to find how the coolant is distributed inside the machine and how heat is distributed in the device.