Bound state equation for the Nakanishi weight function