ψ[x_]:=f[x](E^(I k x))

ψ[z]

D[ψ[z],{z,2}]//Simplify

parts[u_,v_,n_]:=-D[u,x]D[v,{x,n-1}]

parts[x psic[x],psi[x],2]-parts[x psi[x],psic[x],2]//Simplify

Integrate[Exp[((-(((p-p0))^2))/(4((σp)^2)))+I (p/ℏ) x],{p,-∞,∞},Assumptions->{ℏ>0,x∈Reals,p0∈Reals,σp>0}]