Answer:
These lines are taken from "Love's Labor's Lost" Act IV scene iii, written by william shakespeare. The lines are in the form of a poem which is read by Berowne upon his arrival to the palace.
Explanation:
The background of these lines is the king and three lords swearing to an oath of scholarship. This oath entails fasting and avoiding contact with women for three years. However, these lines by Berowne who is one of the lords, revealed that all of them including the king, are in love to different women. Berowne is resisting his feelings and chose to hang himself rather than accept his love for a woman. He said that he will lie to the world but he will keep loving her and she already knows as she has received my sonnet.